function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CVLGCVLG 

Insufficient access rights error message on new record for custom object

We have a set of custom objects and some scontrols using AJAX that are used to create a set of new implementation tracking
records from a closed/ won Opportunity and then assign ownership of those new records to the right Implementation Director.

The scontrol has worked fine for months... up until 02/10/06 when we began receiving an error message indicating
"insufficient access rights on cross-referenced id" whenever the AJAX script tried to create a new record.

I have determine the cause but not the fix... When I run the scontrol under the SysAdmin role, it works fine. If I run the scontrol
under the normal but more restrictive Operations Coordinator role, it throws the error for all cases where the new Owner is different than the
logged in user.

I suspect there has been a recent change to the API re: validation of OwnerID. Can anyone confirm and/ or suggest a solution?

Here is the relevant portion of the AJAX script.

Thanks in advance for any clues - this is causing our client MAJOR headaches!

//## CREATING IMPLEMENTATION
var thisImplementationId;
document.write("
saving Implementation record");
var insertImplementationArray = new Array();
insertImplementationArray[0] = implementation;
var implementationSR = sforceClient.Create(insertImplementationArray);
//alert("saved imp..."+implementationSR.length);
//document.write("
STATUS - implementationSR: "+implementationSR.toString());
for (var sri=0;srivar oneSaveResult = implementationSR[sri];
if (oneSaveResult.success == true) {
thisImplementationId = oneSaveResult.id;
} else {
alert("Error while saving Implementation: " + oneSaveResult.errors[0].message);
}
}
DevAngelDevAngel
Do you still have this problem?
CVLGCVLG
Thanks Dave - Yes, we still have this problem. It just began happeing on 2/10/06 after several months of smooth operation. I believe it is caused by recent SFDC changes to OwnerID validation on custom objects. It looks like the system will let us UPDATE the OwnerID on existing custom object records, but not CREATE new custom object records with a different OwnerID. Please also see my Case 00722815.

Thanks!
DevAngelDevAngel
Hi Steve,

Are you using a workaround right now? I see your case is in process and engineering is trying to track it down.
CVLGCVLG
Thanks for the follow-up Dave. No, our customer has declined the work-around in favor of resolving it directly through SFDC. Nia Samady is engaged and has been working through functional test with me to identify the issue.
Drew1815Drew1815
Has this issue been resolved? I am having a similar issue when trying to set the OwnerId upon creating a new Opportunity via the AJAX Toolkit/S-Control. The create call works fine if I don't try to set the OwnerId, but unfortanately this is a requirement. Additionally, the same user who runs the S-Control but the create call fails CAN clone an Opportunity using the Clone functionality or create a new Oppty and set themselves as the Owner.

Just curious if there is a re-usable solution?
sgoremasgorema
Is this a known bug? I am also trying to set the OwnerId when creating an opportunity. It works fine if I run the Scontrol (as Administrator) but if anyone else tries it fails.