Selecting quote line items from intelligence pane catalog does not trigger on change event on mft_part_num

In Quotes I have an on-change event on ProductsQuoteDataRelateField to set price and tax from an ERP.

custom/modules/Products/clients/base/fields/quote-data-relate/quote-data-relate.js

({
  extendsFrom:'ProductsQuoteDataRelateField',
  initialize: function(options){
    this._super('initialize', [options]);
    this.model.on('change:mft_part_num', this.triggerERPLookup,this); //takes care of user-added/modified lines
  },
  triggerERPLookup: function(){
    //do the lookup and set tax and price for the line item
  }
})

But this does not trigger when the user selects the product using the product catalog dashlet.

Any suggestions on how to trigger the same logic when the product catalog dashlet is used?

thanks,
FrancescaS

Parents Reply Children
  • Actually you may need to extend the method onAddNewItemToGroup from modules/ProductBundles/clients/base/views/quote-data-group-list/quote-data-group-list.js once the previous I mentioned is a private one.

    In this case you need to decide whether to invoke the ERP integration from inside this extended method if product_template_id is populated as per variable prepopulateData.

    Good luck!

    André Lopes
    Lampada Global
    Skype: andre.lampada