pressi
January 29, 2013, 9:41am
1
Hi everyone,
I have created one dataitem customer i want to insert balance in General form based on each customer…i have written this code…it was not effecting can any one please suggest me where i done mistake in that
Customer.CALCFIELDS(Customer.“Balance (LCY)”);
IF Customer.“Balance (LCY)”<>0 THEN
MESSAGE(’%1’,Customer.“Balance (LCY)”);
Gen.RESET;
Gen.SETRANGE(Gen.“Journal Template Name”,‘Assets’);
Gen.SETRANGE(Gen.“Journal Batch Name”,‘Default’);
Gen.VALIDATE(Gen.“Journal Template Name”,‘Assets’);
Gen.VALIDATE(Gen.“Journal Batch Name”,‘Default’);
Gen.INIT;
Line:=0;
IF Gen.FINDLAST THEN
Gen.“Line No.”:=Line+ 10000
ELSE
Line:=Gen.“Line No.”+1000;
Gen.“Balance (LCY)”:=Customer.“Balance (LCY)”;
// Line:= Line+1;
Gen.INIT;
pressi
January 29, 2013, 9:55am
3
My requirement is to create with a report only?
Change this
Customer.CALCFIELDS(Customer.“Balance (LCY)”);
IF Customer.“Balance (LCY)”<>0 THEN
MESSAGE(’%1’,Customer.“Balance (LCY)”);
Gen.RESET;
Gen.SETRANGE(Gen.“Journal Template Name”,‘Assets’);
Gen.SETRANGE(Gen.“Journal Batch Name”,‘Default’);
Gen.VALIDATE(Gen.“Journal Template Name”,‘Assets’);
Gen.VALIDATE(Gen.“Journal Batch Name”,‘Default’);
Gen.INIT;
Line:=0;
IF Gen.FINDLAST THEN
Gen.“Line No.”:=Line+ 10000
ELSE
Line:=Gen.“Line No.”+1000;
Gen.“Balance (LCY)”:=Customer.“Balance (LCY)”;
Line:= Line+10000;
Gen.INSERT;
pressi
January 29, 2013, 10:27am
5
what i have change in that…In customer balances was coming but it was not inserting into the general form…Suggest me
Use GEN. Insert at the end.
pressi
January 29, 2013, 11:06am
7
I have inserted in the above code
pressi
January 30, 2013, 5:52am
8
HI Amol,
I changed that code but it was not getting
You need to assign Account Type and Account No. also