Salesforce’s Omnistudio Dataraptors are an invaluable tool. They automate complex business processes, making life easier for admins and users alike. However, there’s one major limitation: they lack the ability to execute in system mode. In this blog post, we’ll explore why this limitation exists, and delve into workarounds that can help you achieve your goals without writing custom code.
The System Mode Conundrum
In Salesforce, there are two modes of execution: user mode and system mode. Imagine you’re at a high-profile dinner party. In user mode, you can only interact with the people directly seated at your table. But what if you want to mingle with everyone at the party? That’s where system mode comes in—giving you the freedom to move around and interact with anyone. In the Salesforce realm, system mode essentially represents unrestricted access.
Getting Creative: Workarounds for Running Dataraptors in System Mode
While Dataraptors may not have a built-in system mode, there are several workarounds that can help you achieve similar outcomes. We’ll explore three effective strategies: Apex Code, Permissions Changes, and OmniOut.
Apex Code
Writing Apex code gives you the ability to specify whether the code runs in user or system context. Using an apex class in place of a Dataraptor is a viable alternative to ensuring your Omniscript, Flex Cards, Integration Procedures retrieve and update the appropriate information in Salesforce. NOTE: You can invoke a Dataraptor from apex, but regardless of whether you specify user or system context, the Dataraptor will ALWAYS run in user context.
Permissions Changes
Ensure the users that will be triggering the Dataraptors have the appropriate permissions to records, objects, and fields that the Dataraptor interacts with. If you cannot give users access for either licensing or security reasons, you should look at the Apex Code or OmniOut options.
OmniOut
OmniOut allows you to deploy Omnistudio components to anywhere on the web. When deploying to OmniOut, you are able to specify the running user for the Omnistudio components. Assigning the running user to a user that has the relevant permissions to records, objects and field will allow the Dataraptor to interact with the appropriate data.
Conclusion
Salesforce’s Dataraptors may not currently offer a system mode option, but these workarounds can bridge the gap. By mastering these alternative methods, you’ll be equipped to overcome any obstacle that comes your way. At SOLVD, we’re all about providing practical solutions that empower Salesforce users. If you’ve found this content helpful or would like to talk more about implementing Omnistudio, feel free to reach out to SOLVD here to learn more about our consulting services.