RE: Disable item renumbering from item card
Shawn, This was very helpful, I am trying to identify how to what to call before the code is executed. Right now, I am just trying to run a message that the change is going to take place if they continue, but it is coming up after the change takes place. Any guidance from here?
I have tried both:
EventSubscriberInstance = StaticAutomatic;
[EventSubscriber(ObjectType::Page, Page::"Item Card", 'OnBeforeValidateEvent', 'No.', true, true)]
local procedure CheckItemChangeBeforeValidateEvent(var Rec : Record Item)
begin
Message('You are about to change this item number');
end;
And
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.", 'OnRenameRecordInApprovalRequest', '', true, true)]
procedure ConfirmChange()
begin
MESSAGE('You are about to change this item number');
end;