1

I have written a workflow rule where the following criteria should be met:

Account: ABCD Grid (Account)EQUALSNull) AND ((Account: Record TypeEQUALSBusiness_Account_FR) OR (Account: Record TypeEQUALSBusiness_Account_IT)

I want to do field update for Business_Account_FR record type for one Picklist value in the field of Account and another Business_Account_IT record-type for another pick-list value in the field of Account?

Is it possible to write in single Workflow Rule with two field updates for two different Record types?

If there can be any formula field instead of this rule then also please suggest.

Business_Account_FR:
Field to Update:
ABCD_Grid__c : Unknown(Picklist Values)

Business_Account_IT:
Field to Update:
ABCD_Grid__c : D(Picklist values)
0
1

Note: I didn't fully test this, but I've done something similar. You may need to slightly adjust this process to suit your needs.

You couldn't do this with a Workflow Rule, but you could use the Process Builder for this. Basically, you'd do this:

Setup > Create > Workflow & Approvals > Process Builder

Create a New Process Builder

Click the "New" button. Provide a "Process Name", "API Name", "Description", and choose This process starts when "A record changes", and finally "Save" this Process Builder.

Select the Object

Click on "+ Add Object", specify Object "Account", and Start the process "when a record is created or edited", and finally "Save" your changes.

Configure Entry Condition

Click on "+ Add Criteria", add a Criteria Name, and in the Set Conditions area, choose ABCD Grid Equals Global Constant "$GlobalConstant.Null", and click "Save" (we'll add the remaining two conditions in a moment).

Configure Immediate Actions

Click on "+ Add Action", choose Action Type "Update Records", set Action Name "France", then the Record Type "Select the Account that started your process", and then "Choose". After that, select Criteria for Updating Records "Updated records meet all conditions", and enter Record Type Id Equals Formula "if([Account].RecordType.Name='FR',[Account].RecordTypeId, Null)". Finally, specify the field to update, and set the type and value you desire. Click "Save" to complete this action. Repeat the process for Italy, replacing FR with IT as appropriate.

Activate the Process

Once you're satisfied with how it looks, click "Activate" to make it active, and then test it out.


If this seems like a lot of work, it is. However, the Process Builder has a lot more power under the hood and can do things that workflow rules are not capable of. However, unless you're really pressed for workflow rules (e.g. you're nearing the per object or global rule limit), you should probably just write two workflow rules with two field updates instead. It takes significantly less time to set up, and is easier to maintain than using a Process.

0
0

For the formula suggestion, you have to define a new formula field of type Text, and then in the formula body you put :

  IF(RecordTypeId  = "<Id_Of_Business_Account_FR_record_type>", "Unknown", 
    IF(RecordTypeId = "<Id_Of_Business_Account_IT_record_type>", "D", "")) 
2
  • @ihsaan In workflow Rule itself formula Evaluates to true one option is there that i am asking
    – SFDC
    Jan 27 '17 at 12:58
  • But the formula even if it evaluates to true how can the workflow execute field update for each record Type, it's impossible, once the criteria is met (with formula or normal criteria) all the actions defined in your workflow will be executed. At the moment of executing actions, The workflow will not choose which action to execute, it will execute them all. This is why i told you in the other question that the with Process Builder will be easy
    – ihssan
    Jan 27 '17 at 13:12

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.