Hi all,
I have a Generic Inquiry which triggers a business event on “Record Inserted”.
The point of this is to trigger a downstream process when a new Customer Location is inserted (from AR303020 let’s say). This works in principle, however we’re finding the following issue:
If a user enters anything other than basic information on the location record, let’s say someone picks from a user defined field or some other association; when we’re consuming the data in our custom business event subscriber, The locationID key field from the Location table is being passed through as zero. If the user just fills in basic information then the correct new id for the Location is passed.
It’s as if the event is being kicked off before the Location record has been persisted to the database.
We have a number of joins on the Generic Inquiry so in theory I guess it is data being persisted in those tables that is triggering the event too early (for our needs).
Can anyone shed any light on this behaviour? We need to try and keep the joins we have in the GI as we use that data in a downstream process. Is there a way to configure the Business Event to trigger later, or once all records for that operation have persisted?
Many thanks.