Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Item Tracking Code

(0) ShareShare
ReportReport
Posted on by

Hey guys,

I am developing an Item Tracking function and for that I have created a action, which calls my new function in its OnValidate-trigger.

Here you see the code, which is executed, when I click on my action:

pastedimage1565610539233v1.png

Unfortunately I get the following error messsage, when the code is executed:

'Item Tracking Code' must contain a value in 'Item': 'No. = 1000'. The value can not be null or empty.


What does that mean?

How can I solve this issue?

Thank you :)

 
Categories:
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,740 Moderator on at
    RE: Item Tracking Code

    You need to make sure that your code can be used for item that does not use Item Tracking.

    Do this after testfield.

    Item.GET("Item No.");

    IF Item."Item Tracking Code" = '' THEN

     EXIT;

  • Suggested answer
    jcastro Profile Picture
    2,245 on at
    RE: Item Tracking Code

    You just need to use the "Item No." you have to "GET" the item record (table 27). After that, IF Item."Item tracking code"='' THEN EXIT 

  • Suggested answer
    Avinash B Profile Picture
    1,455 on at
    RE: Item Tracking Code

    You are passing the "Item No." to the function SetItemData. That Item which your passing must have Item Tracking Code.

  • Community Member Profile Picture
    on at
    RE: Item Tracking Code

    How and where do I exclude the items, which have no Item Tracking Code?

  • Suggested answer
    jcastro Profile Picture
    2,245 on at
    RE: Item Tracking Code

    I think your function considers the items with some tracking needs, but you may have forgotten to exclude the items that do not have those tracking requirements to not run your code :-) Checking the "Item tracking code" being empty should be enough.

  • Verified answer
    Avinash B Profile Picture
    1,455 on at
    RE: Item Tracking Code

    Hi,

    If you want to track any item, it must have an Item Tracking Code attached to it. 

    So in order to do that, Open Item card > Item Tracking Fasttab > Item Tracking Code. Select the tracking code from the list.

    pastedimage1565611286553v1.png

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

Featured topics

Product updates

Dynamics 365 release plans