I have a problem while posting a negative adjustment Item Journal in Navision 3.7.
I have created a dataport to populate the Item Journal Line table.
I am populating the following fields:
Line No.
Journal Template Name
Journal Batch Name
Document No.
Posting Date
Entry Type
Item No.
Lot No.
Quantity
Unit of Measure Code
When I try and post the Journal I am getting an error: "Tracking Specification Is missing"
Any help would be appreciated!
0
Comments
Then a Manually enter a line underneath it.
I go to the table and compare the two to see all the fields that the manual entry fills is also being filled when using the dataport.
If not then there are some validates missing (usually)
http://www.BiloBeauty.com
http://www.autismspeaks.org
Problem is, that the field "Lot No. " is just for internal use. You cannot post a line with filled this field. You need to use the Reservation entry table to add the tracking or use another functionality to post the line. Posting line with tracking is much harder than without it.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
There are around 500 lines in my import file so doing this manually will take for ever. Is there any way I can do this by using dataports?
Or programatically?
Thanks
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Before posting the item journal call the following function
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Please forgive my confusion.
Where exactly should I call the function? Should I call it on the OnAfterImportRecord of the dataport or the onPush trigger on the Post button?
thanks
LLoyd
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thanks for getting back to me. I think I am nearly there however I am getting the following error when posting the Item Journal..
Item Tracking Serial No. Lot No, 42519 for Item No. 1010025 Variant cannot be fully applied.
The only difference I made to the code was to change the call to the CreateReservEntry function so that I added the actual Quantity instead of the hardcoded quantity of "1"
My code..
CreateReservEntry.SetDates(0D, 0D);
CreateReservEntry.CreateReservEntryFor(
DATABASE::"Item Journal Line",
"Item Journal Line"."Entry Type",
"Item Journal Line"."Journal Template Name",
"Item Journal Line"."Journal Batch Name",
0,
"Item Journal Line"."Line No.",
"Item Journal Line"."Qty. per Unit of Measure",
"Item Journal Line".Quantity,
'', "Item Journal Line"."Lot No.");
CreateReservEntry.CreateEntry(
"Item Journal Line"."Item No.",
"Item Journal Line"."Variant Code",
"Item Journal Line"."Location Code",
"Item Journal Line".Description,
"Item Journal Line"."Posting Date",
"Item Journal Line"."Document Date",
0,
2);
That's why you would get the error, because it cannot find it in inventory.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thanks you that worked perfectly. Can I use this functionality for possitive adjustments?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I am experiencing a problem while trying to run my dataport for a Positive adjustment in that I am getting the following error:
Qty. per Unit of Measure must not be 0 in Item Journal Line Journal Template Name='ITEM' Journal Batch Name='DEFAULT, Line No.='1'
I am running the following VALIDATE functions onAfterImportRecord which seem to be causing the problem:
"Item Journal Line".VALIDATE("Item No.");
"Item Journal Line".VALIDATE("Item Journal Line"."Entry Type");
"Item Journal Line".VALIDATE("Item Journal Line".Quantity);
to see the callstack, turn on debugger active, and uncheck break on trigger.
When the error happens the debugger will start and stop at the error.
You will see one of the button on menu called callstack and inside you'll see the lines.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
GLSetup <Uninitialised>
Item <Uninitialised>
SKU <Uninitialised>
Vend <Uninitialised>
ResCost <Uninitialised>
Currency <Uninitialised>
TempPurchPrice <Uninitialised>
TempPurchLineDisc <Uninitialised>
ResFindUnitCost <Uninitialised>
LineDiscPerCent <Uninitialised>
Qty 0
QtyPerUOM 0
VATPerCent 0
PricesInclVAT No
VATBusPostingGr ""
PricesInCurrency No
PriceInSKU No
CurrencyFactor 0
ExchRateDate ""
FoundPurchPrice No
DateCaption ""
ItemJnlLine <Uninitialised>
CalldByFieldNo 0x00000003
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Hopfully this is it.
Codeunit 7010 Purch. Price Calc. Mgt.\FindItemJnlLinePrice(ItemJnlLine,CalledByFieldNo)
Table 83 Item Journal Line\Item No. - OnValidate()
Dataport 50004 Item Pos Adjustment\Item Journal Line - OnAfterImportRecord()
If it's sales or purchase, make sure On the Item card
"Purch. Unit of Measure"
"Sales Unit of Measure"
are set to a value.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n