[EventSubscriber(ObjectType::Page, Page::"Item Units of Measure", 'OnInsertRecordEvent', '', true, true)] local procedure OnNewItem(var Rec: Record "Item Unit of Measure") var Item: Record Item; ItemCard: Page "Item Card"; begin Item.SetCurrentKey("No."); Item.SetRange("No.", Rec."Item No."); if Item.FindSet() then begin Message('Successful in Item No.: %1', Item."No."); ItemCard.Editable := true; Item."Last Date Modified" := Today; Item."Last DateTime Modified" := CurrentDateTime; Item."Last Time Modified" := DT2time(CurrentDateTime); ItemCard.Update(); ItemCard.Editable := false; end; end;
Answers