[Event Request] Report 402 "Purchase Document - Test" - Procedure "TestJobFields" - "OnBeforeTestJobFields"
In order to handle the testfields with our own logic we need a new event raiser and publisher at procedure "TestJobFields" of Report 402 "Purchase Document - Test" with Handled-Pattern.
OLD CODE:
procedure TestJobFields(var PurchLine: Record "Purchase Line")
var
Job: Record Job;
JT: Record "Job Task";
begin
with PurchLine do begin
if "Job No." = '' then
exit;
NEW CODE:
procedure TestJobFields(var PurchLine: Record "Purchase Line")
var
Job: Record Job;
JT: Record "Job Task";
// start kvspsa - New Variable added
IsHandled: Boolean;
// stop kvspsa
begin
// start kvspsa - Event Raiser added
IsHandled := false;
OnBeforeTestJobFields(PurchLine, IsHandled);
if IsHandled then
exit;
// stop kvspsa
with PurchLine do begin
if "Job No." = '' then
exit;
NEW PUBLISHER:
// start kvspsa - Event Publisher
[IntegrationEvent(false, false)]
local procedure OnBeforeTestJobFields(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean);
begin
end;
// stop kvspsa
I'm sorry about it, but we need to enlarge the event raiser and event publisher by two parameters for handling the error text!
New Event-Raiser:
OnBeforeTestJobFields(PurchLine, ErrorCounter, ErrorText, IsHandled);
New Event-Publisher:
// start kvspsa - Event Publisher
[IntegrationEvent(false, false)]
local procedure OnBeforeTestJobFields(var PurchLine: Record "Purchase Line"; var ErrorCounter: Integer; var ErrorText: Array[50] of Text[250]; var IsHandled: Boolean)
begin
end;
// stop kvspsa
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.