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
Lokesh KumarLokesh Kumar 

Want to develop an App on salesforce which run in system mode.

Requirement:
I want to create an app which update the user information like profile, email,license etc. and give it to service desk engineer so the can solve the ticket related to user detail modification by own.
For the above requirement modify-all permission is required, but i want to do this without any dependency of an logged-in user means in system-mode context.
Please suggest some ideas.

i tried visual flow and process-builder but i get to know that visual flow run's in a user-mode and process-builder doesn't support screen. only we can execute the auto-flow(which doesn't have screen to take the input from the user).
Big EarsBig Ears
Lokesh,

Apex runs in system mode, although Visualforce bindings will respect a user's field level security. Depending on the field level security of your expected users, your best bet here may be to have a Visualforce page with custom variable bindings (e.g. {!userName} rather than {!User.Name}) and manage the data in your apex class. On processing the data, push the values of your custom variables into the SObject you need.

You may also need to ensure you use the "Without Sharing" keyword in your class.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm

Andy
Lokesh KumarLokesh Kumar
Thanks Andy for your response,

i am able to perform the changes using autolaunched flow and proces builder, only the issue is emial is not changing though it's running in system mode. i am able to change the service cloud access and federation ID in the user detail. 

Please respond.