8 answers
We can do this in two ways
Way 1: (Without coding)
Create a Long area text field (32,567 approx) and update opportunity record by amending product values
for e.,g prod1 and prod2 selected update it as new_Field__C = assing selected products , record will be saved succesfully
Now create a formula (check box type) over opportunity line item and wring if ( Contains(New_Filed__c, 'Product Name') return true.
So as it is formula field it will be calculated automatically, if selected checked automatically
Way 2: (using apex plugin) - NOT SUGGESTED
write apex plugin such that need to query using opp Id & prod name and we need to get opp Line Item Id , then using this Id we need updated opportunity line item to true on product selected