ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 5405 OnDelete: OnAfterOnDelete
In table 5405 Production Proder, trigger OnDelete, please add the following code at the end
[...]
IF Status = Status::Finished THEN
DeleteFnshdProdOrderRelations
ELSE
DeleteRelations;
// >> New
RefreshRecord := FALSE;
OnAfterOnDelete(Rec,RefreshRecord);
IF RefreshRecord THEN
GET(Status,"No.");
// << New
LOCAL [IntegrationEvent] OnAfterOnDelete(VAR ProductionOrder : Record "Production Order";VAR RefreshRecord : Boolean)
The deletion of the current Rec triggers deletion in other (and also: custom) tables, whose deletion update the record to delete. Without the new GET, the deletion will end with an error message stating that the record to delete is outdated.
This request is similar to event request #1518