TransWikia.com

Allow community users to change own account information

Salesforce Asked by Eduardo López on December 10, 2021

I’m building a community in which new users (Accounts) are assigned to a given Partner after the signup. Hence, the Partner takes ownership of the account.

New users must provide additional information after the signup. This is done by showing a Flow in the community’s landing page. This flow should then update the user’s account with the given information.

The problem is that the account is not owned by the new user, but by the Partner, so attempts to update the user’s Account information within the flow fail:

Error element update_address (FlowRecordUpdate). The flow tried to
update these records: null. This error occurred:
INSUFFICIENT_ACCESS_OR_READONLY: insufficient access rights on object
id. […]

I’m aware I could ask for all required information within the initial signup-form but I would like to avoid that to keep that form as simple as possible.

So I would like to know the best way to allow users to update their own Account information without messing too much with account ownership or organization-wide sharing settings.

NOTES:

  • Person Accounts are activated in my org.
  • I’m currently working around this by setting the Sharing Settings for the Account object to "Public Read/Write" for internal and external access, which surely is not a good practice.

Thanks in advance

2 Answers

The Field "How to run the Flow" under the advanced Flow Settings defines which resources will be available when the flow is executed:

  • "System Context with Sharing - Enforces Record-Level Access" takes into account sharing settings when running the flow (defined as per Prakhar's anwser).
  • "System Context Without Sharing - Access All Data" ignores sharing settings and allows full access to the object(s) used in the flow.

Best practice, in this case, would be to use "System Context with Sharing" and define specific sharing settings for the Account object.

enter image description here

Answered by Eduardo López on December 10, 2021

You can set the OWD for Account to be Private and add criteria based Account Sharing Rule.

You can use Record Type for criteria (or any other field that uniquely identifies such Account records for Community users).

For example, the below sharing rule shares the Account records with all Custom Portal Community users.

enter image description here

Answered by Prakhar Saxena on December 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP