Auto populate fields when i select quotation

I'm fighting against this issue since a couple of weeks and I can't figure out a way to do that.

Because i am new to sugarcrm and development

I have created a custom module COF where i want to select the quotation then auto populate the fields(all fields from quotation) to COF. so how can i get the values easily from one module to another module.

1. Can we do this based on JS because i want to edit any field then i can edit before save.

2. is it possible with custom logic hook. before save the document.

Francesca Shiekh hatsVignesh V

 I really need help, as soon as possible.

Thank you

Parents
  • Hi Ash,

    You can use 'populate_list' property in vardef file of a quote relate field to auto populate the COF module fields based on related quote.

    For eg: if your vardef file is custom/Extension/modules/<COF_Module>/Ext/Vardefs/<cof_quote_file.php>

    $dictionary['<COF_Module>']['fields']['<quote_relate_name>']['populate_list']['name']='<field_in_cof_module>'; //populate quote name to <field_in_cof_module>
    $dictionary['<COF_Module>']['fields']['<quote_relate_name>']['populate_list']['description']='<field_in_cof_module>'; //populate quote description to <field_in_cof_module>

    Similarly, you can use this property to populate as many fields as you want from the related quote module.

    Let us know if this helps.

    Regards.

  • hats

    Thanks for Reply,

    In my vardef file multiple files are there like relationship fields and text fields 

    so should i write in relationship file(cof_customerorderform_quotes_1_COF_CustomerOrderForm) or billing address,billing city individusl files

Reply Children
No Data