Hi All,
There is one question I seek for your advise :
"If Microsoft baseapp is subscribing to an event, and our app as PTE are also subscribing to that event, will Microsoft BaseApp codes always run first ?"
Real scenario is :
On codeunit 5345 "Integration Rec. Synch. Invoke".There are events OnAfterInsertRecord and OnAfterModifyRecord.
Microsoft baseapp is subscribing to those events in codeunit 5341 "CRM Int. Table. Subscriber".
One of the thing that BaseApp's codes do is when synching 'CRM Salesorder-Sales Header', it will change the status of Sales Order to Release.
The thing is, we need the status to be Open after synchronize
(We will need to do approval in Business Central ).
p.s :
I tested subscribing to that event and set the status to open and it works fine in Sandbox ( Baseapp's codes will run first). Probably due to my app ID is smaller that BaseApp ID.
Baseapp ID : 437dbf0e-84ff-417a -***
Our app ID : ea74d4be-8b1f-46ce-***
The thing is that I am not 100% sure that this will always work without failing if I apply to prod.
So, it would be appreciated if you have any reference or experience that can be shared.