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

Community site session details

Session Id :
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)

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • mmv Profile Picture
    11,471 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?

  • Community Member Profile Picture
    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.

  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 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

  • Verified answer
    mmv Profile Picture
    11,471 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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans