How to retain the values from detail to multiselect lookup modal window?
Hi Team,
I would like to retain the values/records in the detail when i click on + sign (Add record in the detail) into the modal pop-up of multiselect lookup.
STEP 1: I'm using a multiselect lookup object and selecting couple of values on Add Record of a detail (i.e., clicking + sign)
STEP 2 : After selecting values from step 1, when i click + sign again, i would like to retain the values available in the detail grid to the modal popup with the checkbox selected.
STEP 3 : The multiselect lookup's modal pop-up should be like this.
when one of the selected value in STEP 1 (ex., incoming document 1) is unchecked and a new value is selected (ex., Regulation 3) the insertion should act accordingly.
Incoming Document 1 --> Should be removed from detail (since its value is unchecked now)
Minutes 2 --> should be available in the detail (since already selected in STEP 1)
Regulation 3 --> Should be added to the detail.
Kindly guide to achieve the above!
Thanks in advance!
Regards,
Bhoobalan P.
Like
Hi Bhoobalan,
Basically there are two tasks that you need to solve:
1) Display already added records to the detail in the modal window that is opened upon adding new records to a detail
2) Check these added records in the list
As for the 1-st task - you will need to override the openLookupWithMultiSelect method from the LookupMultiAddMixin mixin (for example you can create your own module and copy the code of the original LookupMultiAddMixin mixin and use it in the detail schema). The part of code that checks already records is:
const filtersConfig = this.createAlreadyAddedRecordsFilter();
As for the 2-nd task you will need to dynamically change CSS for elements in the modal window and add grid-row-selected CSS to it. Unfortunately we don't have any practical examples on this particular step.
Best regards,
Oscar