IC Chart of Accounts

alien251alien251 Member Posts: 80
I'm going thorugh the steps to setup intercompany postings in my development environment and I'm in the IC Chart of Accounts form running FUNCTIONS>COPY FROM CHART OF ACCOUNTS. I'm getting this error:

The value of UPDATEINDENT parameter 1 is outside of the permitted range.

The current value is: -220
The permitted range is: from 0 to 2147483647

Has anyone ever encountered this before?

Thanks!!

Dan

Comments

  • kapil4dynamicskapil4dynamics Member Posts: 591
    Try to indent ur COA from where u r copying. I think that itself has some issue.
    Kapil Khanna
  • alien251alien251 Member Posts: 80
    There's a bug in the code that populates the Indentation column on the IC GL Account table. It should never assign a negative value yet it does. I updated the table directly using this code and the IC COA is indented properly and the form loads fine now.

    UPDATE dbo.[Company$IC G_L Account] SET
    Indentation = Indentation + 1

    Copy from Chart of Accounts function:
    ICGLAccEmpty := NOT ICGLAcc.FIND('-');
    ICGLAcc.LOCKTABLE;
    IF GLAcc.FIND('-') THEN
      REPEAT
        IF GLAcc."Account Type" = GLAcc."Account Type"::"End-Total" THEN
          PrevIndentation := PrevIndentation - 1;
        IF NOT ICGLAccEmpty THEN
          ICGLAccExists := ICGLAcc.GET(GLAcc."No.");
        IF NOT ICGLAccExists AND NOT GLAcc.Blocked THEN BEGIN
          ICGLAcc.INIT;
          ICGLAcc."No." := GLAcc."No.";
          ICGLAcc.Name := GLAcc.Name;
          ICGLAcc."Account Type" := GLAcc."Account Type";
          ICGLAcc."Income/Balance" := GLAcc."Income/Balance";
          ICGLAcc.Indentation := PrevIndentation;
          ICGLAcc.INSERT;
        END;
        PrevIndentation := GLAcc.Indentation;
        IF GLAcc."Account Type" = GLAcc."Account Type"::"Begin-Total" THEN
          PrevIndentation := PrevIndentation + 1;
      UNTIL GLAcc.NEXT = 0;
    


    Thanks for the reply!

    Dan
Sign In or Register to comment.