I want to copy the dimensions from Item ledger entry to Item journal. How can I get a new Dimension set ID for the Item journal line. Below is the code I have.
itemledg.reset;
itemledg.setrange("Posting date",PostingDate);
if itemledg.findset then begin
DimSetEntry.reset;
Dimsetentry.setrange("dimension set ID",itemledg."dimension set id");
if dimsetentry.findset then begin
repeat
Newdimsetentry.reset;
Newdimsetentry.init;
Newdimsetentry.transferfields(dimsetentry);
newdimsetentry."dimension set id" := getdimensionsetid(dimentry); (Which does not work)
Newdimsetentry.insert;
until dimsetentry.next = 0;
end;
end;
Code highlighted just does not work. I just want to get a new dimension set ID for the Item journal line.
Any help is highly appreciated.
RJ.
itemledg.reset;
itemledg.setrange("Posting date",PostingDate);
if itemledg.findset then begin
DimSetEntry.reset;
Dimsetentry.setrange("dimension set ID",itemledg."dimension set id");
if dimsetentry.findset then begin
repeat
Newdimsetentry.reset;
Newdimsetentry.init;
Newdimsetentry.transferfields(dimsetentry);
newdimsetentry."dimension set id" := getdimensionsetid(dimentry); (Which does not work)
Newdimsetentry.insert;
until dimsetentry.next = 0;
end;
end;
Code highlighted just does not work. I just want to get a new dimension set ID for the Item journal line.
Any help is highly appreciated.
RJ.