howto auto-populate custom fields from product templates

I have added a custom field to product templates and to products as well. How can I achieve that the custom field in products gets auto-populated from the product template field when the product is added to the quote?

I have version 7.6.

Parents
  • Hi Alexander,

    You can customization

    - modules/Quotes/tpls/EditViewFooter.tpl to custom/modules/Quotes/tpls/EditViewFooter.tpl

    in tpl file <script type="text/javascript" src="{sugar_getjspath file='modules/Quotes/EditView.js'}"></script> change path to custom folder <script type="text/javascript" src="{sugar_getjspath file='custom/modules/Quotes/EditView.js'}"></script>

    in EditView.js file 

    function set_product_return(popup_reply_data)

    {

       ..... so on code below your custom field auto populated

         quotesManager.lookup_item('tax_class_name_' + row_id, window.document).value = name_to_value_array['tax_class_name'];

        quotesManager.lookup_item('CUSTOM FIELD NAME_' + row_id, window.document).value = name_to_value_array['CUSTOM FIELD NAME']; 

      

    }

    Regards,

    Dipesh

    Offshore Evolution Pvt Ltd

Reply
  • Hi Alexander,

    You can customization

    - modules/Quotes/tpls/EditViewFooter.tpl to custom/modules/Quotes/tpls/EditViewFooter.tpl

    in tpl file <script type="text/javascript" src="{sugar_getjspath file='modules/Quotes/EditView.js'}"></script> change path to custom folder <script type="text/javascript" src="{sugar_getjspath file='custom/modules/Quotes/EditView.js'}"></script>

    in EditView.js file 

    function set_product_return(popup_reply_data)

    {

       ..... so on code below your custom field auto populated

         quotesManager.lookup_item('tax_class_name_' + row_id, window.document).value = name_to_value_array['tax_class_name'];

        quotesManager.lookup_item('CUSTOM FIELD NAME_' + row_id, window.document).value = name_to_value_array['CUSTOM FIELD NAME']; 

      

    }

    Regards,

    Dipesh

    Offshore Evolution Pvt Ltd

Children
No Data