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
Surbhi ModiSurbhi Modi 

Apex code to achieve below requirement

Add Similar Products related list to Product Object. This is a list of active, existing products that assigned to this Product.
Add Optional products related list to Product Object. This is a list of active, existing products that assigned to this Product.
When assigning Product Items to Opportunity, SO, Quote after search you land on Add Products screen. Need to add 2 buttons on this screen. Make sure sorting is working properly.  
Save and Add More – will save current product and show Add Products screen with the same product to add.
Save and Add Optional – Will save current product and will show list with Optional products that was preselected in current Product Object. From that screen can add one or multiple products to.
mukesh guptamukesh gupta
Hi Surbhi,

As per your requirment you need to fully customization for product.

Example:-
  1. First you need to override button Add product buttin with Quick action.
  2. This quick action will reffer to lightning component
  3. AddProduct component(Parent) and Search product component(Child) and OpportuntiyProduct component(Child)
  4.  AddProduct will have two child component as above.
  5. Now you can search and add product by customization 

if you need any help please let me know.

If this solution is usefull for you, Please mark as a Best Answer to help others.


Regards
Mukesh

 
Surbhi ModiSurbhi Modi
Hi, Request you to provide the code as well as I am beginner in Salesforce development.