Invoice Miscellaneous Charges not Showing in Total

I have a Data Directive BPM on the InvcDtl table that adds a specific miscellaneous charge whenever a line is added to the ttInvcDtl table. Everything appeared to be working as expected but I just noticed that even though the charges are appearing on each line they are not reflected in the line price. They even show up on the printed invoice but the price still only shows the original charges. If I add another misc charge manually, that is reflected in the price but the original (the one added through the BPM) still isn’t included in the total. Any ideas here? I’m pretty stumped.

Business objects(beforeUpdate, afterUpdate) and code triggers contain a lot of logic regarding updates to related records, simply creating a record and saving it in a transaction is sometimes not enough to get everything synced up.

I think table BPMs are more useful for small changes to the same table, UD tables or additional validations, not for new record creation, a service method BPM might be better and using an instance of the BO instead of just a transaction and DB Context.

Then again I don’t really build or use them so I can’t say for sure.

I have noticed 2 things after more testing since posting earlier.

  1. When I use the BPM it doesn’t populate the InvcMisc.ChangeDate field but when I add a Misc Charge manually or even through code directly on the form it does.
  2. I have been using the Update method on my BPM but the trace shows that an UpdateMaster method is being used. One of the parameters being passed into this method is a boolean (which according to the trace is false so that’s what I’m passing in) regarding creating an amortization schedule. When I use this method it gives me an error that amortization schedules can’t be created.

I’m fighting with this myself right now. Pretty stumped.

Does anyone have any suggestions?

thanks