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
S b 25S b 25 

Store multiples selected values from checkbox in to different fields

I have a requirement where there is a VF page to select multiple records using checkbox, and those values should get saved in multiple fields on a different object. The VF page opens on a click of button.

So, now the issue is, I will select 2 fields, both of them will get saved to field1__c and field2__c. When you again click on button and select another value, then it should get saved to the third field field3__c. Now the value is overriding the first field  field1__c  on a new transaction. 

Unfortunately i am unable to paste the code here. Any help would be appreciated on the above issue.
Deepali KulshresthaDeepali Kulshrestha
Hi,

According to your requirement, you want to select multiple records using checkbox, and those values should get saved in multiple fields on a different object. The VF page opens on a click of a button. I have found some articles related to the same query that you are having.Please refer to the following links as they may be helpful in solving your problem:

https://developer.salesforce.com/forums/?id=906F000000091SmIAI
https://salesforce.stackexchange.com/questions/65055/how-to-save-checkbox-values-to-a-multiselect-picklist

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha