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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Please Help ASAP - Pro...
Power Pages
Unanswered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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');
}
});
Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    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.

     

  • Noorahmad004 Profile Picture
    27 on at

    @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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
sannavajjala87 Profile Picture

sannavajjala87 38 Super User 2026 Season 1

#2
Valantis Profile Picture

Valantis 37

#3
Fubar Profile Picture

Fubar 23 Super User 2026 Season 1

Last 30 days Overall leaderboard