I have a new multi-select picklist field on opportunity that needs to be updated with values from an opportunity child object. Here's how the data looks when queried via workbench..

Opportunity products

I'm looking to get the data in a similar format below in order to update the picklist field.

Opportunity Id => Retail;Retail90;Mail

Does anyone know how to do this? Thanks!

  • Btw, multi-picklist values are common for all opportunities as they are metadata. But here each of the opty could have different set of values. So how would you reconcile and show those values? – singularity Feb 25 '15 at 21:50
  • @singularity that's what I'm looking for - a way to iterate over the list so that for every opportunity id, get me corresponding product values as a string separated by semi-colon. – humanoid Feb 25 '15 at 22:01
  • If you want to achieve this, you will have to build a new VF page to edit that field of opportunity. In the init part of the page, retrieve the list of values and show them as possible options. – singularity Feb 25 '15 at 22:08
  • an alternative is to write an after update/insert/delete/undelete trigger on OLI that updates the parent Opportunity's MSP field with the unique values from all children OLI of that Oppo - there are numerous SFSE examples that show this – cropredy Feb 25 '15 at 23:11

I came across an excel solution, did an extract via the dataloader then did some vba magic to get me what I wanted. Here's the link: https://superuser.com/questions/536234/excel-how-to-vlookup-to-return-multiple-values Looks like this..

enter image description here

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.