web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Get rid of New Location Code must have a value in Item Journal Line: Journal Template Name=, Journal Batch Name=, Line No.=0.

(0) ShareShare
ReportReport
Posted on by

I kept getting the error when trying to perform a direct transfer of inventory from one location to another.

New Location Code must have a value in Item Journal Line: Journal Template Name=, Journal Batch Name=, Line No.=0. It cannot be zero or empty.

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    The solution to this is to go to inventory setup and uncheck location mandatory field.

  • Joost Bulsink Profile Picture
    Microsoft Employee on at

    Thank you for sharing a solution to your question. Hopefully this solution will help other community members. If you have more solutions and information that you would like to share please consider hosting a blog. You can find information about content guidelines and how to submit a request here.

  • Community Member Profile Picture
    on at

    I had the same error and tried this solution.  The inventory shipped and was auto-received into an "UNSPECIFIED" location rather than the "Transfer-to Code" location specified on the transfer order.

  • Elena G Bianchi Profile Picture
    Microsoft Employee on at

    Is this really the solution?

    Removing Location Mandatory flag causes the system allows posting on Blank location, and in case you posted some positive entries in blank location before Direct Transfer, the negative transfer entry in blank location will consume those previous entry and the positive transfer entry will remain open.

    This looks to me a Bug.

    Posting Date Entry Type Document Type Document No. Item No. Description Location Code Quantity Invoiced Quantity Remaining Quantity Sales Amount (Actual) Cost Amount (Actual) Cost Amount (Non-Invtbl.) Open Order Type Entry No. Order No.
    24/01/2020 Transfer Transfer Receipt 109006 MEDIO ROSSO 10 10 10 0 0 0 Yes Transfer 358 1022
    24/01/2020 Transfer Transfer Receipt 109006 MEDIO -10 -10 0 0 0 0 No Transfer 357 1022
    24/01/2020 Transfer Transfer Shipment 108009 MEDIO 10 10 10 0 50 0 Yes Transfer 356 1022
    24/01/2020 Transfer Transfer Shipment 108009 MEDIO BLU -10 -10 0 0 -50 0 No Transfer 355 1022
    23/01/2020 Purchase   T00004 MEDIO BLU 100 100 90 0 1.000,00 0 Yes   354
    23/01/2020 Purchase   T00003 MEDIO 100 100 100 0 500 0 Yes   353
    23/01/2020 Purchase   T00003 MEDIO 100 100 90 0 0 0 Yes   352
  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at

    Disabling the Location Mandatory field just resolves the error message and lets you post, but as a best practice, you should not be using the blank Location code if you have more than one Location (Location is essentially the Business Central terminology for a warehouse).

    Only businesses that only have one warehouse and aren't planning on adding warehouses should allow the use of a blank value for Location Code for inventory related transactions. Even then, for future-proofing, I would suggest that the best practice is to create one Location code and use it (and enable the Location Mandatory field in Inventory Setup).

    In a multi-warehouse scenario (typically, this is when you would need to transfer inventory from warehouse to another, or as Business Central calls it, from one location to another), it goes against best practice to allow the use of blank Location code. This is really why the Location Mandatory flag exists; The only reason why it may be acceptable to be transferring inventory from a blank Location code to a different Location code is because you started with one warehouse but didn't create a Location Code for it, and later decided to add more warehouses in Business Central and are trying to move out any remaining inventory from the blank Location code to the proper one. And once you are done, the next step you should take is to go to the Inventory Setup page and check the Location Mandatory field so no one accidentally uses the blank Location again.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

  • Elena G Bianchi Profile Picture
    Microsoft Employee on at

    Thanks AJ but the question here is about new feature in NAV 2018 allowing Direct Transfer on Transfer Order, the aim of that is to post Transfer Shipment and Transfer Receipt at once and … it doesn't work in a multi location environment (the only one where a Transfer Order makes sense) where Location is mandatory because that feature (Direct Transfer) seems designed to post In-Transit entry on Blank location (see OnValidate trigger of Direct Transfer field in table 5740).

    So agree with you the Location Mandatory should be true … thus the new feature is not working.

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at

    Hi Elena,

    Sorry I missed that part / context. And frankly, I didn't realize that Microsoft had added a Direct Transfer feature in NAV 2018.

    I was checking the Released Cumulative Updates for NAV 2018 page and I see that Microsoft addressed a Direct Transfer bug in Cumulative Update 3 (CU3) / Build 20783. Are you by chance on an older Cumulative Update / build of NAV 2018?

    Below is the specific KB ID related to the fix in CU3:

    Direct-Transfer-01.PNG

    The latest CU for NAV 2018 is CU6, so it'd be worth it to deploy that to fix the issue. It's either that, or manually fix that particular snippet of faulty code. Alternately, if you open a support case with Microsoft to get the specific lines of code and objects affected by the fix.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

  • Suggested answer
    AJAnsari Profile Picture
    5,754 on at

    Hi again Elena,

    I need more coffee. This question was in the Business Central forum and I answered with a fix for NAV (partly because you'd mentioned NAV 2018). :-)

    If you are indeed using Business Central, then you can't do much to overcome that issue other opening a support case with Microsoft so they can log it as a bug and have it fixed with the next update. The Business Central builds and NAV 2018 builds don't hotfix issues at the same time, so it's possible that it was fixed in NAV 2018 CU3, but not yet address in Business Central.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans