Hi
I want to Insert some fields in my table from my setup table, as default fields for every new record.
Currently, it is not getting the records from my Setup Table, as soon as I add the source type and move to the next field it gets records on my page.
I have tried both OnInsert() in my table and OnInsertRecord() in my form, but it only works when the record is inserted into the table... when I leave the control that shows the primary key in the form.
// This is the code on my Card Page of above screenshot.
trigger OnInsertRecord(BelowxRec: Boolean): Boolean
var
uerRoyaltyAllocationParm: Record uerRoyaltyAllocationParameters;
begin
uerRoyaltyAllocationParm.Get();
Rec.uerCommLedgerDimensionAccount := uerRoyaltyAllocationParm.uerCommLedgerDimensionAccount;
Rec.uerAllocLedgerDimensionAccount := uerRoyaltyAllocationParm.uerAllocLedgerDimensionAccount;
Rec.uerBatchLedgerDimensionAccount := uerRoyaltyAllocationParm.uerBatchLedgerDimensionAccount;
end;
Is there any way or any other method to initialize the values before I insert the primary key.. as we do with the Init method of D365F&O?
Thanks.