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

Is it possible to save multiple values to a single field for a Custom Object.

2 objects are there. Invoice,Client and Payment. in Invoice Screen, Payments is the Related List. So if we save payment, That payment is saved under that invoice with that Invoice Client.
But now my requirement is:
On the payment screen, the user will select a Client. A screen will pop up with all the open invoices for that Client sorted in descending order. The user will select the Invoices that the payment is to be applied. When user click Apply, the payment will applied to the oldest invoices first until complete payment has been used.

If the payment amount was larger than the selected invoices, the user can select another Client. Again a screen will pop up with all the open invoices.

This process will repeat until the complete payment has been applied.
Is it possible to save multiple values to a single field.
The only type of field that can accept multiple values is a multiselect picklist, but that doesn't seem like it would work here.

This sounds like a great place for a custom junction object and a Visualforce page to do the finding and sorting of relevant invoices.  I'd link to the Visualforce page from a button on the CJO related list.
can u please tell me how to create Custom junction object.
A custom junction object is just a custom object with 2 Master-Detail relationships.