I have a table Purchase Header with Enum field Invoice category with number of options.Now,I need that when i select one option here ,the selected option should be displayed on another page posted invoices.How can i achieve this?I am using this code after pageextension where i want to display but it is not working.
trigger OnAfterGetCurrRecord()
var
RecPurchchaseOrder : Record "Purchase Header";
RecPostedInvoice : Record "Purch. Inv. Header";
begin
RecPurchchaseOrder.Reset();
RecPurchchaseOrder.SetRange("Invoice Category",RecPostedInvoice."Invoice Category");
RecPostedInvoice."Invoice Category" := RecPurchchaseOrder."Invoice Category";
end;