Hi expert, I have a question and I need your advice. In the payment Journal, after we fillled in the first row, and ready to move on, we had an error "Dimension Can't be found". We haven't set up any demension in our current system. Thank you!
I want to give you experts more details about this error. In the blank payment journal, the first field is Posting date, which is today's date, Right after I select any of them from the document type, I will have this error when I move the tab all the way to the the last field of the first row withour entering any data.
Please adivse! Thank you!
From Chart of Accounts -> Related information -> Account -> Dimensions -> Dimensions-Single, then remove the acocunt no. filter and check for any record with Dimension Code blank.
You said you didn't set up any dimension in your system: so, in General ledger setup, all fields in "Dimension" tab are empty? In this case it's correct to see blank Shortcut Dimension Code on documents and journal lines.
Thank you experts! I checked and we don't have any value in the dimension. But the error won't go. Now we have the same problem in the cash receipt journal. We cannot do anything. Dimension is the requirement. Do we really need to set up the dimension? Is there any way to resolve this without setting up the dimension? Thank you!
I cannot repro the scenario in my latest version. Which version do you run?
Could you please try to turn on the debugger and see exactly where it fails?
Thank you for your quick response, expert! I followed your instructions. I can see the mouse insert is active in the Code screen, but I cannot type anything in the code window.
ValidateShortcutDimValues(FieldNumber : Integer;VAR ShortcutDimCode : Code;VAR DimSetID : Integer)
ValidateDimValueCode(FieldNumber,ShortcutDimCode);
DimVal."Dimension Code" := GLSetupShortcutDimCode[FieldNumber];
IF ShortcutDimCode <> '' THEN
DimVal.GET(DimVal."Dimension Code",ShortcutDimCode);
IF NOT CheckDim(DimVal."Dimension Code") THEN
ERROR(GetDimErr);
IF NOT CheckDimValue(DimVal."Dimension Code",ShortcutDimCode) THEN
ERROR(GetDimErr);
GetDimensionSet(TempDimSetEntry,DimSetID);
IF TempDimSetEntry.GET(TempDimSetEntry."Dimension Set ID",DimVal."Dimension Code") THEN
IF TempDimSetEntry."Dimension Value Code" <> ShortcutDimCode THEN
TempDimSetEntry.DELETE;
IF ShortcutDimCode <> '' THEN BEGIN
TempDimSetEntry."Dimension Code" := DimVal."Dimension Code";
TempDimSetEntry."Dimension Value Code" := DimVal.Code;
TempDimSetEntry."Dimension Value ID" := DimVal."Dimension Value ID";
IF TempDimSetEntry.INSERT THEN;
END;
Hi, first of all I think there is some custom code in the function posted, since I'm not able to find the red marked lines in both NAV 2013 and 2013 R2:
ValidateDimValueCode(FieldNumber,ShortcutDimCode);
DimVal."Dimension Code" := GLSetupShortcutDimCode[FieldNumber];
IF ShortcutDimCode <> '' THEN
DimVal.GET(DimVal."Dimension Code",ShortcutDimCode); IF NOT CheckDim(DimVal."Dimension Code") THEN
ERROR(GetDimErr);
IF NOT CheckDimValue(DimVal."Dimension Code",ShortcutDimCode) THEN
ERROR(GetDimErr);
GetDimensionSet(TempDimSetEntry,DimSetID);
IF TempDimSetEntry.GET(TempDimSetEntry."Dimension Set ID",DimVal."Dimension Code") THEN
If you didn't setup any dimension in General Ledger Setup, DimVal."Dimension Code" will be empty and function CheckDim will fail. In my opinion you should add the marked code as follow to make it work:
ValidateDimValueCode(FieldNumber,ShortcutDimCode);
DimVal."Dimension Code" := GLSetupShortcutDimCode[FieldNumber];
IF ShortcutDimCode <> '' THEN
DimVal.GET(DimVal."Dimension Code",ShortcutDimCode); IF ShortcutDimCode <> '' THEN
IF NOT CheckDim(DimVal."Dimension Code") THEN
ERROR(GetDimErr); IF ShortcutDimCode <> '' THEN
IF NOT CheckDimValue(DimVal."Dimension Code",ShortcutDimCode) THEN
ERROR(GetDimErr);
GetDimensionSet(TempDimSetEntry,DimSetID);
IF TempDimSetEntry.GET(TempDimSetEntry."Dimension Set ID",DimVal."Dimension Code") THEN
Comments
Please adivse! Thank you!
Neil
You said you didn't set up any dimension in your system: so, in General ledger setup, all fields in "Dimension" tab are empty? In this case it's correct to see blank Shortcut Dimension Code on documents and journal lines.
Could you please try to turn on the debugger and see exactly where it fails?
Microsoft - Dynamics NAV
From RTC (if you are running NAV 2013) -> Setup/Setup IT/General -> Sessions -> On your session Press "Debug" and insert line in payment journal.
ValidateShortcutDimValues(FieldNumber : Integer;VAR ShortcutDimCode : Code;VAR DimSetID : Integer)
ValidateDimValueCode(FieldNumber,ShortcutDimCode);
DimVal."Dimension Code" := GLSetupShortcutDimCode[FieldNumber];
IF ShortcutDimCode <> '' THEN
DimVal.GET(DimVal."Dimension Code",ShortcutDimCode);
IF NOT CheckDim(DimVal."Dimension Code") THEN
ERROR(GetDimErr);
IF NOT CheckDimValue(DimVal."Dimension Code",ShortcutDimCode) THEN
ERROR(GetDimErr);
GetDimensionSet(TempDimSetEntry,DimSetID);
IF TempDimSetEntry.GET(TempDimSetEntry."Dimension Set ID",DimVal."Dimension Code") THEN
IF TempDimSetEntry."Dimension Value Code" <> ShortcutDimCode THEN
TempDimSetEntry.DELETE;
IF ShortcutDimCode <> '' THEN BEGIN
TempDimSetEntry."Dimension Code" := DimVal."Dimension Code";
TempDimSetEntry."Dimension Value Code" := DimVal.Code;
TempDimSetEntry."Dimension Value ID" := DimVal."Dimension Value ID";
IF TempDimSetEntry.INSERT THEN;
END;
The arrow stops on ERROR(GetDimErr)
If you didn't setup any dimension in General Ledger Setup, DimVal."Dimension Code" will be empty and function CheckDim will fail. In my opinion you should add the marked code as follow to make it work: