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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Accessing salesheader from salesline.

(0) ShareShare
ReportReport
Posted on by 487

Hi,

Context:  I have a variable in the salesheader that I want to use in my sales line.

I am trying to access the sales header from the sales lines, but I get the following error:

'SalesHeader' is inaccessible due to its protection level.

So when I try to do in sales line: "Document No.", it is always empty. When I try to do SalesHeader."No.", i get the error above.

Any idea how to access the sales header from the sales lines please?

Cheers

  • Hannes Holst Profile Picture
    5,769 on at

    hi,

    Can you post your 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 545 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 354 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 228 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans