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
SKTSKT 

Get Child field values in Parent

Below is my Object Schema:
  • Parent: User
  • Child: Contact
  • Grand-Child: Sponsor. Sponsor Holds a field called ProId. These as 16 digit Ids.
Now, my requirement is to get all the ProIds from the sponsor records populate on the User record as a multi-select picklist value. The field on User is named All_Pros__c
For eg: On User A, All_Pros__c field should hold values as 'id1';'id2';'id3'.

Can anyone please suggest any approach on ths regard.
sakhisakhi
Hi SKT ,

You can write a apex trigger to do this . There are multiple codes which can be seen to store value sin multiselect picklist values in below link .

https://developer.salesforce.com/forums/?id=906F0000000AydMIAS

Please try to reference and if you face any issues , paste your code here .