You need to sign in to do that
Don't have an account?
ywang
Can I delete OpportunityShare objects using API?
The value "None" is included in the picklist of "OpportunityAccessLevel". But I failed in trying to delele a manually set OpportunityShare object by AJAX API.
the erroe means that "None" is an invalid value for OpportunityAccessLevel.
The source code is as following.
var contact = new Sforce.Dynabean("OpportunityShare");
contact.set("ID","00t10000001TvMi");
contact.set("OpportunityAccessLevel","None");
contact.set("UserOrGroupID","00510000000LjoT");
var saveResult = sforceClient.update([contact]);
contact.set("ID","00t10000001TvMi");
contact.set("OpportunityAccessLevel","None");
contact.set("UserOrGroupID","00510000000LjoT");
var saveResult = sforceClient.update([contact]);
By the way, the action of create succeeded.
Look forward for any advice.