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
Sakthi Saranya 10Sakthi Saranya 10 

Custom Button to approve products and create assets on approval on product(related list on oppty).

Hi,
I have a requirement to create an approve button in the products(related list under opportunity). When the user selects the products and click on approve button, then for each product line item an asset record should be create on approval. Can anyone suggest some samples please.
Nikhil Verma 6Nikhil Verma 6
Hi Sakthi,
You can use a custom javascript list button on the Opportunity Products object (I am assuming that the Product related list is a standard Opportunity Products list) and then add this to the related list on Opportunity layout. 
In the javascript code, write the complete code to create the required records for the selected product line items. For more information on how to create objects using javascript, visit this link: https://success.salesforce.com/answers?id=90630000000gwhCAAQ

Hope this helps.