Codeunit 86 Sales-Quote to Order
The publisher OnBeforeInsertSalesOrderHeader seems to have been placed in the wrong place. It is located before the modify instead of before the insert is executed. If necessary, a second publisher should be used at the specified location.
The same places are shown in the following codeunits:
87 - Blanket Sales Order to Order
96 - Purchase Quote to Order
97 - Blanket Purch. Order to Order
Why is it important to add another publisher?
So that we can set a SingleInstance flag before the Insert(true) is executed to prevent the processes of the subscribers that trigger the RunTrigger. This is necessary so that data is transferred from the quote to the order but not reloaded.
@qutreson
yes the name of the publisher is now really misleading.
About codeunit 86 OnBeforeInsertSalesOrderHeader (first post): This has not been fixed yet even in the D365BC RTM release. I need it for my add-on too.
Please also provide a "real" OnBeforeInsertSalesOrderHeader(VAR SalesOrderHeader,SalesHeader) and OnAfterInsertSalesOrderHeader(VAR SalesOrderHeader,SalesHeader) in function CreateSalesHeader..
The very same bug can be found in codeunit 96, function CreatePurchHeader.
There is only one event OnBeforeInsertPurchOrderHeader, and it's placed before PurchOrderHeader.MODIFY;.
Reply from the application team:
Placement is correct, name is not good but we cannot change anymore.
Why did you close the request. There is still a need of the recommended Events @StanislawStempin
@StanislawStempin what does it mean?
the reply from the application team is not really a solution.
Will there be a new event publisher? Do you rename the existing wrong named publisher?
@StanislawStempin: Still waiting for an answer...
Most helpful comment
Why did you close the request. There is still a need of the recommended Events @StanislawStempin