web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : OOOgSMpnmCBZ686ACBJhpe
Power Pages - Power Apps Portals
Unanswered

how to associate option sets using portal Web AP insert (post)I?

Like (0) ShareShare
ReportReport
Posted on 7 Apr 2021 09:27:28 by 20

Dear experts?

 

I am adding new record using Power App portals Web API post option, does not seem to work and gives error:
Error: Resource not found for the segment br_prance.

I have a field called br_type which is an option set has value as below:
717750000 - Alpha

717750001 - Beta

I need to add a new record via portal web API -
Here is the complete json
{
"br_type": "717750001",
"br_name": "Prev 1",
"br_iscancelled": "TRUE",
"wr_MemberId@odata.bind": "/contacts(6f1a341c-8097-eb11-b1ac-000d3aafa583)",
"wr_CustomerId@odata.bind": "/contacts(6f1a341c-8097-eb11-b1ac-000d3aafa583)"
}

 

Please if someone can help, how you can assign option sets while adding a new record via portal, is this the wrong way?

I have the same question (0)
  • Fubar Profile Picture
    8,070 Super User 2025 Season 2 on 07 Apr 2021 at 22:26:23
    Re: how to associate option sets using portal Web AP insert (post)I?

    With some of the Web Api errors I have found more info by F12 the browser and look at the web traffic for the call that gives the error (i.e. the error response from the call sometimes has more info than what you originally see in the JS error or console).

     

    Edit: and the "77..." in the JSON should probably be without quotes

     

    If its a field/relationship issue you can try putting an asterisk * in the field list in your site settings instead of listing the fields (and if that works then you know its an incorrect field name reference).

     

    From memory, if its a customer look up its something like the relationship name e.g. /myfield_contacts(…..)

     

  • jimmymcad Profile Picture
    20 on 07 Apr 2021 at 10:45:06
    Re: how to associate option sets using portal Web AP insert (post)I?

    I managed to fix the first issue - It was something different
    Now I am getting another error - Slowly after removing every field - I found the issue is on this one:
    "wr_CustomerId@odata.bind": "/contacts(6f1a341c-8097-eb11-b1ac-000d3aafa583)"

     

    This time the error is 
    Error: Common Data Service error occurred.

     

    Further digging reveals that this field is locked on CRM forum? Could this be an issue? Can we not add values to a read only field?

    Please confirm, or else how do I add this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Pages

#1
Jon Unzueta Profile Picture

Jon Unzueta 174 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 37 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 34 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete