You need to sign in to do that
Don't have an account?
Andrew McNamara 13
lightning:recordeditform guest user case and accountid
I want to use lightning:recordeditform in a component in lightning communities to create a case. I need the guest user to be able to either create a person account or match a existing account to retrieve the accountid and the personcontactid. When I insert the accountid into the case and call the submit() method for the recordeditform I'm getting a "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITIY"....which makes sense as the guest user doesn't have access.
I have privacy issues setting the account owner to the guest user as that would make all guest users have permissions to all accounts.
How can I use lightning:recordeditform to create a case as a guest user in the community?
I have privacy issues setting the account owner to the guest user as that would make all guest users have permissions to all accounts.
How can I use lightning:recordeditform to create a case as a guest user in the community?
You are getting this error because you don't have read access on that account. How about creating an AccountShare record and share it with the guest user with Read Access and then use it to create a case . For more information follow this link:-
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_accountshare.htm
Hope it helps, if it does mark it as solved.
Thanks
So essentially, onSubmit and onSuccess will be a server call to add and remove the share.
I am using the recordeditform to prevent multiple apex server transactions, and this process just seems costly.