AnsweredAssumed Answered

Quote/product_bundle created through logic hook results in extra group in line items subpanel

Question asked by Arie Knoester on Aug 2, 2018
Latest reply on Aug 13, 2018 by Arie Knoester

I am working on a logic hook which creates a related Quote whenever a Case is created and the field 'Case Type' has a certain value. A 1:1 relationship exists between Quotes and Cases. I noticed that when a Quote is created normally through the UI, a new product_bundle row is created and the ID is used to relate it to Quotes in the product_bundle_quote table. So in my logic hook, I create the same process. (Note that if you only create a Quote and save, a product_bundle is NOT created and therefore there is no new relationship in product_bundle_quote)



This looks fine in the database. A new product_bundle is created. It is related to the Quote in the product_bundle_quotes table. The bundle_id matches the id from the product_bundle and the quote_id matches the Quote that was created. Note below that the bundle_index has a value of 0. This matches exactly what I see if you create a new Quote through the UI.



The issue I am having is that the QLI subpanel has an extra group added to it for some reason. 


I played around with groups in the QLI subpanel and looked at the database. It appears that when you create a new group, a new product_bundle is created > it is related to the Quote in product_bundle_quote > the bundle_index is incremented +1.


I'd appreciate it if anyone has any ideas on why this extra group appears and how I can avoid its creation when my logic hook fires.