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
emuelasemuelas 

Trigger to get quote line items into custom object

Hi,

 

Iam  new to Apex.I have  custom objects Order and Order Line Items (master detail).The order line items appears as a related list under the Order object.

 

Whenever an order is created from the quote,the quoteline items should be inserted as order line items ....This functionality is just like how the opportunity products are inserted as quote line items whenever a new quote is created from the opportunity.

 

Is it possible to do this using a trigger?

 

If yes ,can i please have some pointers to any sample trigger code that does this kind of insert from a related list of the master object to the related list of the detail object

 

Thanks!

Ispita_NavatarIspita_Navatar

Yes the functionality you are trying to implement can be done via triggers.

KeithJKeithJ

It doesn't make sense to use triggers here. If you are looking to mimic the standard salesforce functionality of entering multiple line items, you should use visualforce and apex.

 

Regards

miteshsuramiteshsura

 : can you show us how. I have custom Product Bundle object, and can see it in Opportunity related list.

I want this related list to be displayed under Quote, when user hits "New Quote" button in Opportunity related list.

 

As of now I can just see the standard Opportunity Line Items under Quote.

Thanks for the time...