Skip to main content

Notifications

Community site session details

Community site session details

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

The Sales Header does not exist. Identification fields and values: Document Type='Invoice',No.=''

(0) ShareShare
ReportReport
Posted on by 479

Weirdest thing. I get this error when I hit "New" Sales Invoice. But I don't get the error when I open an existing Sales Invoice (unposted). This seems to be a contradiction because both open the same page right?
I believe error stems from my code here (page extension on Sales Invoice page):
29.PNG

  • jdrco Profile Picture
    479 on at
    RE: The Sales Header does not exist. Identification fields and values: Document Type='Invoice',No.=''

    Thanks

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: The Sales Header does not exist. Identification fields and values: Document Type='Invoice',No.=''

    You should use the OnAfterGetRecord trigger instead.

    When you are in the OnOpenPage trigger no data is loaded from the database yet.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans