[EventRequest] Codeunit 5057 VendCont-Update - OnBeforeInsertContBusRel
Hello,
In procedure InsertNewContact on codeunit 5057 VendCont-Update there is already an event OnBeforeContactInsert in the with do block where the contact record is inserted. We would like to request a similar event (OnBeforeContBusRelInsert) inside the with do block where Contact Business Relation is inserted inside the same procedure so we can also update the information on this record before the insert when necessary.
How it would look in procedure InsertNewContact (starting on line 130 in the codeunit):
with ContBusRel do begin
Init;
"Contact No." := Cont."No.";
"Business Relation Code" := RMSetup."Bus. Rel. Code for Vendors";
"Link to Table" := "Link to Table"::Vendor;
"No." := Vend."No.";
OnBeforeContBusRelInsert(ContBusRel, Cont, Vend);
Insert(true);
end;
The event:
[IntegrationEvent(false, false)]
local procedure OnBeforeContBusRelInsert(var ContBusRel: Record "Contact Business Relation"; Cont: Record Contact; Vend: Record Vendor)
begin
end;
Thank you in advance for your consideration.
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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.