I am trying to detect when a new item is created in Business Central Cloud v21.
I looked at OnAfterOnInsert in the item table but that triggers when the new item card is originally shown and given a generic ITEM*** number.
What I am looking for is the trigger after that initial item card is completed.
hello
recod insertion happens cmq when the primary key is inserted
from the page can be delayed with the DeleayInsert property to TRUE
community.dynamics.com/.../what-is-delayed-insert-and-how-it-works
DAniele
If I understand correctly, you want to detect when the user completes filling in the item information. There is no trigger that detects this, however you could use the OnClosePage trigger on the Item card as a workaround. Note that this trigger only works if users close the page using the back arrow, and not if they navigate to the previous or next item cards.
Since the trigger runs every time a user closes the page, you can also create a new Boolean field like IsInformationCompleted on the Item table that toggles to true the first time the OnClosePage trigger runs to detect if this is the first time the item is created.
Hope this helps!
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156