Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account)

Posted on by Microsoft Employee

Hi, 

When I try to select a cost element for an item the error The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account) is generated. I know the Cost element exists in the chart of account but when I try to dill down from the sales line in the stock issue card I cannot see it. I can only see a filtered values for that particular item. The reason could also be a Gen. Posing set up but I tried that one and couldn't work. I am asking if someone experienced the same problem and help me figure out.

Thanks

*This post is locked for comments

  • Verified answer
    mmv Profile Picture
    mmv 11,465 on at
    RE: The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account)

    So, the value which is displayed in the Sales Line for the moment where you are getting the error is not within the filter applied in either the TableRelation property of the respective field or you need to debug the code.

  • Suggested answer
    Rajasekhar@MS Profile Picture
    Rajasekhar@MS 5,567 on at
    RE: The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account)

    Can you check by activating the debugger, you will be able to find the code what caused the issue

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account)

    Yes, there is a customization in the Sales Line,  the issued card is fully customized which is used to issue items from stores. When I dirlldown in the cost element I can see other GL accounts but others are filtered out.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: The field cost element of table Sales Line contains a value that cannot be found in the related table(GL Account)

    Hi,

    Is there any customization in the Sales Line?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans