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
SA_AdminSA_Admin 

Account Workflow not triggered by User fields

Hi,

I am trying to get a workflow to work in an Account object whenever a User object field meets a criteria. i.e., I need to  update a field value in the Account object whenever the Pilot Profile of the Account Owner is equal to IAM but I have not been successful.

 

I thought since the User field are available, I can use it as a trigger.  Any thoughts?

 

Help is much appreciated.

 

Thanks,

Ispita_NavatarIspita_Navatar

In your case the change whcih would trigger the update on account is occuring on the user record hence the trigger or workflow should be on the user object but work-flow rules are not allowed for user object and though trigger are allowed on User object it doesn't allow what is called "Mixed DML statements" that is updating setup object from a a non-setup object. So what you can do is perhaps build a settings tab which will house a visual force page which will have a button say "Synchronize" which on click will check if there has been any change in the role of a user based on some flags you may set on the user object via a trigger (as you will be able to update the user object in the trigger) and then make the necessary changes in the related account object.