Showing posts with label SetUpNewLine Dimension. Show all posts
Showing posts with label SetUpNewLine Dimension. Show all posts

Wednesday, August 05, 2009

GenJrnlLine.SetUpNewLine Dimension Lines Error

the SetUpNewLine function does the initialization of a new line when creating an automated Journal. I noticed when this function was used for some reason the Journal Line Dimension stopped getting populated. I did not get into the route of the issue however it solves when this function is called after a new line no has been assigned thus i had to change from code from:

LineNo += 10000;
GenJrnlLine.INIT;
GenJrnlLine."Journal Template Name" := GLSetup."Consumption JV Template";
GenJrnlLine."Journal Batch Name" := GLSetup."Consumption JV Batch";
GenJrnlLine.SetUpNewLine(GenJrnlLine, 0.00, FALSE);
GenJrnlLine."Line No." := LineNo;


to

LineNo += 10000;
GenJrnlLine.INIT;
GenJrnlLine."Journal Template Name" := GLSetup."Consumption JV Template";
GenJrnlLine."Journal Batch Name" := GLSetup."Consumption JV Batch";
GenJrnlLine."Line No." := LineNo;
GenJrnlLine.SetUpNewLine(GenJrnlLine, 0.00, FALSE);