Skip to main content
we are calling the below code on a click of custom button from partner communities, 

 

we are getting the javascript error saying "API access is disabled for communities and same piece of code is working from our org, it is giving this issue from communitiy only.

 

Salesforce support is saying API is enabled.

 

And we have tried with different versions of connection and apex.js files but still getting the same error:

 

{!REQUIRESCRIPT("/soap/ajax/18.0/connection.js")}

 

{!REQUIRESCRIPT("/soap/ajax/18.0/apex.js")}

 

var oppty = new sforce.SObject("Opportunity");

 

                  oppty.id = "{!Opportunity.Id}";

 

                  oppty.EQC_Submitted__c = true;

 

                  oppty.EQC_Quote__c = null;

 

result = sforce.connection.update([oppty]);

 

please help. I have debugged this and as soon we it is trying to update we get the JS error
5 个回答