Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Unanswered

Please Help ASAP - Problem in Web Api to Update specific Opportunity Name in Power Apps Portal

(0) ShareShare
ReportReport
Posted on by

hello people I am newbie in Power apps portal and I am stuck with Web Apis, I can Update the name of specific account holder by accountid through ajax PATCH call and it works fine, here is my working AJAX call :

 

webapi.safeAjax({
type: "PATCH",
url: "/_api/accounts(00000000-0000-0000-0000-000000000001)/",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({"name" : "New Account"}),
success: function (res, status, xhr)
{
   alert("Entity id: " + xhr.getResponseHeader('entityid'));
},
fail: function ()
{
   alert ('FAIL');
}
});
 
but when I do the same for Opportunity Table, to update Opportunity Name of specific opportunity then I am having this error : error{code: "9004010C", message: "Resource not found for the segment opportunities.",…}
 
and here is my AJAX call for opportunity :
 
webapi.safeAjax({
type: "PATCH",
url: "/_api/opportunities(00000000-0000-0000-0000-000000000002)/",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({"imd_opportunityname" : "New Opportunity"}),
success: function (res, status, xhr)
{
   alert("imd_opportunityname : " + xhr);
},
fail: function ()
{
   alert ('FAIL');
}
});
  • Noorahmad004 Profile Picture
    27 on at
    Re: Please Help ASAP - Problem in Web Api to Update specific Opportunity Name in Power Apps Portal

    @Anonymous please perform/verify the below steps:

    1- Please check in Portal Management App -> Site Settings and ensure that settings is enabled for the entity and also the fields are also enabled which you are trying to update. You can use XRMToolBox tool called "Power Portal Web API Helper", via this tool you can enable the entity for Web API operation and also allows to enable the fields.

    2- Make sure that entity permission are added for the opportunity entity with proper rights

  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at
    Re: Please Help ASAP - Problem in Web Api to Update specific Opportunity Name in Power Apps Portal

    Hi @Anonymous,

    This error usually means that the entity you are trying to modify wasn't enabled for web API. Please make sure that the entity is enabled and fields list contains the field you are trying to update. Also please try to clear the cache in the portal (under admin account go to <your_portal_url>/_services/about and click Clear Cache). Plus make sure that your user has proper entity permissions as well.

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35