How to assign new record to an internal user (not the guest user)

Hi all@Rob_Hatch

I am trying to create a new record (as a Guest user) but want to assign to an account owner (internal Salesforce user) from a picklist and save.

However, I am now facing an issue as follows:

‘insufficient access rights on cross-reference id’

After googling, it seems that it is a Salesforce error related to the following:

Scenario: When creating a record and attempting to assign it to a new user in the same call

Possible Cause: Create a record first, and in a separate call update the record with a new OwnerId.

How can I do this with Skuid - ie. Save the record and then update it after with a changed Owner?

Its actually salesforce that is going to be preventing you from doing the two step thing. With the security changes made in Spring 21 the guest user can no longer update an existing record.

But let’s back up.

I think the error you getting is because the Guest user does not have read access to whatever either the account object or the user object. This is why the cross reference error is getting thrown. If you can create a Guest User Sharing rule for those records so the guest user can read that data - they should be able to populate that value in your “assignmemnt” field during record creation. That wil let you do the full process in one call.

But if that is not possible - and you need to do the two step process - Salesforce is going to suggest you write system mode Apex for this. (UCK). You could have skuid collect the assignment owner id in a UI only field, and then pass the value into an invokable Apex class that actually does the update. I don’t think there is a way around this.


Thanks for the reply Rob.

I managed to resolve this using a workflow that runs after the record is created. Not ideal but works!