Posting Purchase Invoice on Job with Analytical Dimension

Didimitch
Member Posts: 6
Hello,
I am working on Standard NAV 5 (CH version)
I have the following situation:
I set up a job (JJJ) with one Dimension (DDD), one dimension value (VVV) and I put "same code" on the validation tab.
Then I open a Purchase Invoice, specify the job JJJ in the line and I fill the dimension with the same dimension code (XXX) I put above.
When I post the invoice I get this message :
I have checked to see where the poblem is and it seems that the job journal line created from the purchase line has no Dimension set...
Has anyone had the same problem and fixed it ?
Thank you in advance
I am working on Standard NAV 5 (CH version)
I have the following situation:
I set up a job (JJJ) with one Dimension (DDD), one dimension value (VVV) and I put "same code" on the validation tab.
Then I open a Purchase Invoice, specify the job JJJ in the line and I fill the dimension with the same dimension code (XXX) I put above.
When I post the invoice I get this message :
"Select Dimension value Code XXX for the Dimension Code AAA for Job JJJ"
I have checked to see where the poblem is and it seems that the job journal line created from the purchase line has no Dimension set...
Has anyone had the same problem and fixed it ?
Thank you in advance
0
Comments
-
Yes they have forgotten with the new versions of codeunit to get even the dimensions...no comment...i'm fixing it now...just realize yesterday while trying to post an purch. inv. with job and dimensions!
did you already fix that?Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
Ok...just fixed it, you need to add code in codeunit 90 to copy from document dimension to Journal Line Dimension and not as it is from Journal Line Dimension to Journal Line Dimension then in codeunit 1004 add the global 1 and 2 shortcut when the job journal line is created!
e tutto funziona!
byeWhy don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
Here is the code fix supplied by Microsoft support - they say it will be included in 5.1 service pack. Hope this helps anyone with the same problem.
Codeuni 90 -
PROCEDURE OnRun()
Deleted VAR: TempJnlLineDim2@1021 : TEMPORARY Record 356;
CASE PurchLine.Type OF
PurchLine.Type::"G/L Account":
IF (PurchLine."No." <> '') AND NOT PurchLine."System Created Entry" THEN BEGIN
GLAcc.GET(PurchLine."No.");
GLAcc.TESTFIELD("Direct Posting");
//Old Code Begin
TempJnlLineDim2.RESET;
TempJnlLineDim2.DELETEALL;
DimMgt.CopyJnlLineDimToJnlLineDim (TempJnlLineDim,TempJnlLineDim2);
IF PurchLine."Job No." <> '' THEN
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,JobPurchLine,SrcCode,TempJnlLineDim2);
//Old Code End
...
CASE PurchLine.Type OF
PurchLine.Type::"G/L Account":
IF (PurchLine."No." <> '') AND NOT PurchLine."System Created Entry" THEN BEGIN
GLAcc.GET(PurchLine."No.");
GLAcc.TESTFIELD("Direct Posting");
//New code begin
IF PurchLine."Job No." <> '' THEN BEGIN
TempDocDim.RESET;
TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
TempDocDim.SETRANGE("Line No.",PurchLine."Line No.");
DimMgt.CopyDocDimToJnlLineDim(TempDocDim,TempJnlLineDim);
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,JobPurchLine,SrcCode,TempJnlLineDim);
END;
New Code end
...
PROCEDURE PostItemJnlLine@2(PurchLine@1000 : Record 39;QtyToBeReceived@1001 : Decimal;QtyToBeReceivedBase@1002 : Decimal;QtyToBeInvoiced@1003 : Decimal;QtyToBeInvoicedBase@1004 : Decimal;ItemLedgShptEntryNo@1005 : Integer;ItemChargeNo@1006 : Code[20];TrackingSpecification@1010 : Record 336) : Integer;
Deleted local VAR: TempJnlLineDim2@1021 : TEMPORARY Record 356;
Added Global VAR: TempJnlLineDim:TEMPORARY Record 356;
//Old Code Begin
TempDocDim.RESET;
TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
TempDocDim.SETRANGE("Line No.","Line No.");
DimMgt.CopyDocDimToJnlLineDim(TempDocDim,TempJnlLineDim);
OriginalItemJnlLine := ItemJnlLine;
TempJnlLineDim2.RESET;//deleted line
TempJnlLineDim2.DELETEALL;//deleted line
DimMgt.CopyJnlLineDimToJnlLineDim(TempJnlLineDim,TempJnlLineDim2);//deleted line
ItemJnlPostLine.RunWithCheck(ItemJnlLine,TempJnlLineDim);
...
//Old code end
//New code begin
...
TempDocDim.RESET;
TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
TempDocDim.SETRANGE("Line No.","Line No.");
DimMgt.CopyDocDimToJnlLineDim(TempDocDim,TempJnlLineDim);
OriginalItemJnlLine := ItemJnlLine;
ItemJnlPostLine.RunWithCheck(ItemJnlLine,TempJnlLineDim);
...
//New Code end
//Old Code Begin
...
JobPostLine.GetStartItemLedgEntryNo;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchLine,SrcCode,TempJnlLineDim2);//deleted line
END;
...
//Old code end
//New Code begin
...
JobPostLine.GetStartItemLedgEntryNo;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchLine,SrcCode,TempJnlLineDim); //added line
END;
...
//New Code end0 -
Hello,
I had the same problem, chrisdf, and applied the code you have told us.
The problem of "Same Code" dimension value is fixed, but now I have another problem:
The problem is when I try to Post an order with more than one line, with the same "Job No." and "Job Task No." .
You can test it and see the error it occurs:
when it's processing the second line ... we obtain the error:
"The journal line dimension already exists.
Identification field and values:
Table Id='39',Journal Template Name='',Journal Batch Name='',Journal Line No.='0',Dimension Code='DEPARTMENT'
Am I missing anything?
Thank you in advance0 -
Hello,
I've got the same problem as borjagh and i don't know how to solve it.
Did anybody find a solution ?
Thank you0 -
What version of NAV are you using.
Can you explain your particular scenario more as well0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions