Quoted Line Items Subpanel related Quotation in custom module

I have created a Custom Module(COF) in that module when i select the Quotation all fields are auto populate based on Quotation. So how to get that quotation related Quoted Line Items in a custom subpanel after save the COF Form.

 I really need help, as soon as possible.

Thank you..

Auto populate fields when i select quotation  

hatsFrancesca Shiekh

  • I assume COF has the ID of the Quote you used to generate it. 

    You want to copy QLIs from the Quote into COF Line Items related to COF.

    You could add an after-save logic hook to COF:

    - Check if COF already has COF Line Items related to it, if so Stop here.

    If it doesn't have line items then:

    - use the Quote ID on COF to get the quote bean

    - use the Relationship between Quotes and QLI to get all the QLIs from the Quote Bean

    - Loop through the QLIs and for each one create a new COF Line Item Bean with the appropriate data from the QLI and relate that COF Line Item Bean to the COF.

    FrancescaS