Wednesday, April 11, 2012

Copy multi-select picklist in Salesforce

I am pretty sure, you would have come across a situation where you wanted to copy the multi-select picklist through a workflow rule. Unfortunately salesforce does not provide any easy way to do that. 

Following is what I implemented - though this is not a clean solution, but it works. 

  • Create a long text field. 
  • Create a field update and have the following formula
  • Include this field update in the workflow rule
                        IF ( INCLUDES ( Business_Rule__r.Suffix__c , "SFO" ), "SFO; ",null )&
                        IF ( INCLUDES ( Business_Rule__r. Suffix__c  , "LA" ), "LA; ",null )&

                        IF ( INCLUDES ( Business_Rule__r. Suffix__c  , "NY" ), "NY; ",null )&

                        IF ( INCLUDES ( Business_Rule__r. Suffix__c  , "DC" ), "DC; ",null )&
                        IF ( INCLUDES ( Business_Rule__r. Suffix__c  , "RIC" ), "RIC; ",null )

Suffix__c is a multi select picklist in the business rule object. 
Authentic Blog, featured by BlogUpp

No comments:

Post a Comment