Looking for Event Triggered After Adding A New Line To Quote

Good afternoon power users! I’m trying to figure out what event is triggered after you add a new line item, and part, to a quote.

What I’m doing is this; every time a user adds a part to the quote, I have a Data Directive that automatically adds another line item for a Management fee. But as expected, it doesn’t refresh the UI so the line item doesn’t show up until the user clicks the refresh button. I’ve added “RefreshScreen” to callContextBpmData.Character01 in the directive, and I want to find an event that triggers after a user adds a new part to the quote so I can look for the “RefreshScreen” value and perform the oTrans.Refresh() in the customization. Thanks for your time and any help you can provide!

I don’t think there is a UI event that can detect a change to the source table. Maybe in a AfterRowChange event, you could check the UI’s dataset against the actual data in the table. If there are more records in the DB table, then you need to refresh the UI.

1 Like

@ckrusen Thanks for the help! I have tried various AfterRowChange events (see image below) and haven’t found the one that get’s triggered after a new part has been added to a Quote. I’ll keep trying other events and see if I can’t find one.

It wouldn’t get triggered by the new record made by the DD.

My thought was that when the user switches rows, code in the UI could check to see if the UI’s dataset had the same number of records as the DB table. Basically comparing the number of records in QuoteDtl (for the given QuoteNum), to the number of Quote Lines in the UI’s dataview. If they don’t match, then refresh the UI.

That doesn’t exactly flow if the process is.

  1. In Quote Entry (QE), add a new blank line.
  2. Enter the line info and save. At this point the DD should make a new line in the QuoteDtl table.
  3. Going to the next record causes the UI to see if it needs refresshing.

The problem is, that the record created in step 2 is probably the last line in the quote (at the moment), so you can’t go to the next line.

So maybe a UI event that is triggered after you save the row.

1 Like

The problem is, that the record created in step 2 is probably the last line in the quote (at the moment), so you can’t go to the next line.

@ckrusen You have a great idea, but like you said there won’t be a next line to move to. I’ll look into the row save event idea, but I may have to scrap this whole project and see if I can’t somehow duplicate it on the Method Directive side instead of the Data Directive. Thanks again for your time and help! :star_struck:

Have you thought about implementing the Management fee as a Misc Charge on the line?

1 Like