I’m feeling a little dingy here. How do I program this: DimMgt.InsertJnlLineDim( DATABASE::“Gen. Journal Line”, “Journal Template Name”,“Journal Batch Name”,“Line No.”,0, “Shortcut Dimension 1 Code”,“Shortcut Dimension 2 Code”,“Shortcut Dimension 3 Code”); So that I don’t get the error message: “A maximum of 7 parameters must be used when calling the function”
The native version of this function only took two global dimensions InsertJnlLineDim(TableID : Integer ;JnlTemplateName : Code[10] ;JnlBatchName : Code[10] ;JnlLineNo : Integer ;AllocationLineNo : Integer ;VAR GlobalDim1Code : Code[20] ;VAR GlobalDim2Code : Code[20]) 7 parameters. If you haven’t overridden the default function then you are using 8 parameters instead of 7, hence the error message. If you are handling multiple dimensions other than the 2 globals then you must code those differently. You add those “Extended Dimensions” to Journal Line Dimension table using the same template, batch, line no. of the above and you should then see your dimension attached to those journal lines as “Shortcut Dimension 3”.
Where are you getting the value for Dim 3? There is standard code that get dimension’s from other defaults IF “Account No.” = ‘’ THEN BEGIN UpdateLineBalance; UpdateSource; CreateDim( DimMgt.TypeToTableID1(“Account Type”),“Account No.”, DimMgt.TypeToTableID1(“Bal. Account Type”),“Bal. Account No.”, DATABASE::Job,“Job No.”, DATABASE::“Salesperson/Purchaser”,“Salespers./Purch. Code”, DATABASE::Campaign,“Campaign No.”); Look at this function
Thank you David. That worked like a charm.