This row has been removed from a table and does not have any data

I have a strange error coming up. Having trouble discerning a pattern to it.

I have a BPM with some custom code on Erp.CustShip.UpdateMaster:

The idea is that when the “Shipped” box in Customer Shipment Entry is checked, then it will prompt the user to send a shipping notification email to the customer. However, when this error occurs we don’t even get to the prompt (BPM data form). The only clues we’ve found are these:

  • The error will continue to pop up if you try checking the “Shipped” box again.
  • The error has also been popping up with a similar method directive on OrderHed, prompting the user when another yes/no field is changed from false to true.
  • Usually (but not always) closing Customer Shipment Entry or Order Entry and reopening it resolves the issue.
  • We’ve noticed at least a couple times that multiple windows working on the same table, e.g. Customer Shipment Entry on two workstations, or Customer Shipment Entry and another program working on the SerialNo table or the JobHead table.
  • It seems to be user-specific at any given time, because another user who doesn’t have so many windows open is able to check the box and send the email just fine.

Emails generally should sit in Data Directives -> Standard Directive best place for them.


image

Method Directives:

  • Pre, Post and Base processing logic
  • Access to BOs
  • Ideal place for Validations / Exceptions / Data Changes

In-Tran:

  • Executes after standard Entity Framework data triggers
  • Executes within a transaction, as a part of the trigger pipeline
  • Immediately processes affected row
  • Processes one row at a time (two rows for update operation (RowMod = “” is old row)
  • Can change data on save
  • — The In-Tran should never if it can throw an exception, it is very very expensive rollback.
  • You shouldnt access BOs in here!

Standard:

  • Executes when service method call has completed
  • Executes only if service method completes without exception
  • Processes batch of affected rows at once
  • Does not affect data save
  • Ideal place for integration operations (Audits, Email, Logging, Notifications, API)

As for your error you should probably also add to filter down to Changed Rows only. Whats in your Email Code Block.