Form 634 in NAV 4.x

Ivo_SabioncelloIvo_Sabioncello Member Posts: 3
edited 2006-06-29 in NAV Tips & Tricks
Did you notice form 634 available in NAV 4.x? OK, so try this:

Add this function to form 634 (GLAcc is a G/L Account record):
ExpandAccNo(cNo : Code[20])

TempGLAcc.RESET;
TempGLAcc.DELETEALL;
TempGLAcc.SETCURRENTKEY("No.");

GLAcc.SETFILTER("Account Type",'<>%1',GLAcc."Account Type"::"End-Total");
IF GLAcc.FIND('-') THEN
  REPEAT
    TempGLAcc := GLAcc;
    IF GLAcc."Account Type" = GLAcc."Account Type"::"Begin-Total" THEN
       TempGLAcc.Totaling := GetEndTotal(GLAcc);
    IF (TempGLAcc.Indentation = 0) OR (STRPOS(cNo, COPYSTR(TempGLAcc."No.", 1, STRLEN(TempGLAcc."No.") - 1)) = 1)
  THEN
      TempGLAcc.INSERT;
  UNTIL GLAcc.NEXT = 0;

Add this code at the end of form 634 OnOpenForm trigger:
IF CurrForm.LOOKUPMODE THEN
  ExpandAccNo("No.");

Change LookupFormID property of table 15 from G/L Account List to Chart of Accounts Overview.

Now, try to do your posting setup – it should be faster and esier!

Regards,
Ivo

Comments

Sign In or Register to comment.