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
nelle3223nelle3223 

Validation Rule formula

Hello,

 

I am trying to come up with a formula for our Account Management and Acoount Owner fields.  So when the acount owner is changed to a certain name it will automatically change the Acount Management field to Unmanaged.

 

Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
Madhan Raja MMadhan Raja M

Hi,

 

Using Validation rule we cannot update a field. Use workflow to update the Account Management field to Unmanaged.

 

Follow the below steps:

 

Step1: Create a Workflow rule

Step2: Evaluation Criteria: created, and every time it’s edited

Step3: Rule Criteria (Formula evaluates to true):

 

Use any one of the formula below based on your scenario

 

When ever a Owner is changed

-----------------------------------------------------------------------------------------------

 ISCHANGED( OwnerId )

-----------------------------------------------------------------------------------------------

 

Whenever a particular owner is assigned (Single Owner ID)

-----------------------------------------------------------------------------------------------

AND( ISCHANGED( OwnerId ),  OwnerId =='01rE0000000Csyz')

-----------------------------------------------------------------------------------------------

 

Whenever a particular owner is assigned (Multiple Owner ID's)

-------------------------------------------------------------------------------------------------------------------------------------------

AND( ISCHANGED( OwnerId ),  OR(OwnerId =='01rE0000000Csyz',OwnerId =='01rE0000000DsQz'))

-------------------------------------------------------------------------------------------------------------------------------------------

Change the 01rE0000000Csyz, 01rE0000000DsQz to the owner ID's to which this rule should trigger .

 

Step4: Use Field Update workflow action

Step5: Field to Update = Account Management

Step6: Specify New Field Value (Use a formula to set the new value)

-------------------------------

'Unmanaged'

-------------------------------

 

Regards,

Madhan Raja M