You need to sign in to do that
Don't have an account?

Creating a workflow to stop deactivating user linked to a Teritorry
Hi,
I want to create a workflow to stop deactivating a USer if he/she is linked to a Territory.
For instance, a CDM who stopped working at my org and I need to create a workflow to stop deactivating him/her if the CDM is linked to Territory.
Could anyone please help me as this is urgent.Please see my below workflow.
I am trying to include the Workflow as Territory:CDM equals to True,
Territory Owner is not equal to Deactivate.
The above workflow is not wrking. could someone help me out please?
I want to create a workflow to stop deactivating a USer if he/she is linked to a Territory.
For instance, a CDM who stopped working at my org and I need to create a workflow to stop deactivating him/her if the CDM is linked to Territory.
Could anyone please help me as this is urgent.Please see my below workflow.
I am trying to include the Workflow as Territory:CDM equals to True,
Territory Owner is not equal to Deactivate.
The above workflow is not wrking. could someone help me out please?
You cannot achieve this by workflow. you have to make validation rule by trigger.
Use below trigger it will be helpful for you.
Follow the below steps.
1.) If more than one user is assigned to Territory. Then you have to make a change in the trigger.
In Soql query for user Object : [Select Id, Username, IsActive from User where UserName =: 'Username'].
2.) Use below query for more than one user.
[Select Id, Username, IsActive from User where UserName =: 'Username' OR UserName =: 'Username']
if you have any query please let me know.
Thanks,
Arvind Kumar