1

I want that if Profile of User is not system administrator then if the user updates Title field of User Object then it does not get updated or updates to its previous value. For this I created a workflow, on User object having :

Evaluation criteria : created, and any time it’s edited to subsequently meet criteria

and Rule Criteria : Run this when following formula evaluates to true

Formula is : Profile.Name <> 'System Administrator'

and in New Field Update I have chosen Title in field to update.

and in Specify New Field Value I have written this in formula field priorvalue(title)

Workflow rule is active. But the user is still able to change the title. Where I am going wrong? Please help

1

You can use a Validation rule instead of a workflow. A workflow would be fired after a successful update, which I don't think will work in your case.

You typically want the update to be prevented due to not meeting certain conditions, which is exactly what a validation rule is used for.

  • Thanks @AslamK for the answer, but I dont want to show any error. I am able to do it using trigger but I want to try it using workflow. – Ajay Sainy Jun 25 '14 at 11:41
  • Workflows are generally not for trapping errors. They are for doing certain actions on successful updates. To trap errors you need to go with a trigger or a validation rule. – AslamK Jun 25 '14 at 11:45
  • So you mean we cannot do this by workflow? I am just curious. I am new to SFDC. – Ajay Sainy Jun 25 '14 at 11:48
  • Correct. I dont think you can use it. Since I am not sure if PRIORVALUE will actually contain the old value during the field update. – AslamK Jun 25 '14 at 12:11
1

Try: Evaluate the rule when a record is created, and every time it’s edited

Rule Criteria ISCHANGED( Title ) && NOT($Profile.Name = "System Administrator")

Keep the field update to - priorvalue(title)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.