ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Page 6510 Item Tracking Lines - OnAfterEntriesAreIdentical

Open maksym-ch opened this issue 8 years ago • 1 comments

Hi, we need to implement additional business logic to include new field in reservation entries comparison The following publisher is needed to be added (before exit): Page 6510 Item Tracking Lines - Function EntriesAreIdentical- [IntegrationEvent] OnAfterEntriesAreIdentical(VAR ReservEntry1 : Record "Reservation Entry";VAR ReservEntry2 : Record "Reservation Entry";VAR IdenticalArray : ARRAY [2] OF Boolean) p6510 p1

maksym-ch avatar Oct 30 '18 06:10 maksym-ch

Please be aware that the requested change is dangerous: the most likely approach for consuming this event is to mimic standard code and would be something like IdenticalArray[2] := RE1.x = RE2.x; However, if there has been any change in the fields that standard code checks, the latter (extension) check may override that by returning a false positive. To avoid such a bug, there are 2 options: Standard (simple and save): if IdenticalArray[2] then OnAfterEntriesAreIdentical(RE1,RE2,IA); //If IA[2] already is false, then there's no need for a 2nd check In extension (depends on the devolper): if IdenticalArray[2] then IdenticalArray[2] := (RE1.X = RE2.X);

Bleika avatar Jan 15 '19 13:01 Bleika