Business Event not triggering
I have had success with adding multiple lines by explicitly setting the Source Field/ Value for the <Line Number> Mapping field to an int index starting with 0. If you are interested in the first row (Ex: set Vendor Details for an Item), you can set <Line Number> to have the value of "=0". You could target a second or third line by using "=1" or "=2". It also works for creating a new record or updating an existing record (if the index you target would be the next new record).
The trick is it has nothing to do with the actual Line Number, but instead is based on the sort order of the grid. If, for ex, you are trying to get ARTran of a new invoice to match ARTran of an existing invoice, you could set <Line number> of your import scenario to be "=[ARTran.SortOrder]-1" and your lines should matchup and import that way.
To update our BE's are now working correctly. It was a similar issue where we had actually created a BE to send an email notification anytime there was a failed BE as we were missing that there was an occasional even that would fail. It turned out that this notification BE that was set up to run on record change was causing an issue with all of the by record events triggering correctly. We eliminated this and things are working normally again.
Just as an update, the Acumatica fix for not recognizing multiple line items for a single record in our Business Event was to add additional artran fields to the data source GI (trantype, refnbr, linenbr). We did that and used For Groups of Records with the artran.refnbr field and had success.
We still ultimately put the event on a schedule. We haven't solved for the creation inconsistency yet, but will circle back.
We also had an issue where on first pass a large group of records creating (on a schedule) and failing actually stopped all other automation schedules running for the duration. That is a clue to something, I think, but I am not yet sure what :).
That Automation Schedule clue is interesting @megan-perry.
I personally haven't dug into the depths of Business Events to understand how they get triggered and what carries out the action. Is it done entirely by IIS or is there some Windows Service involved? Where are all the places that you need to check for error logs? I'd love to dig into it at some point, but I know that it will be involved.
I'd love to see any good documentation that anyone has found.
Interested in joining a Local Acumatica User Group? Click here for more info