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
mckinnmdmckinnmd 

Help with Workflow Action - Field Updates

Hi everyone,

After being unsuccessful at creating a workflow action that would update a multi-select picklist, I was told to investigate the use of an Apex Trigger to update the ms picklist.

Can anyone help me create this?

Thank you for any help you can give!
tmatthiesentmatthiesen
You will need to add your own logic - but you can leverage the below skeleton.

---
//Sample for Account

trigger UpdateMSP on Account (before update){

for(Account a : trigger.new){

//assuming mvp has three possible values: one, two, three. Separate the values with semicolons:
a.testmvp__c = 'one;two;three';

}

}
---

Don't forget to write a test for this as well!