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...
Answered

Can't delete a Posted Sales Invoice error

(0) ShareShare
ReportReport
Posted on by 485

Trying to delete a Poste Sales Invoice results in the following error:
Allow Document Deletion Before must have a value in Sales & Receivables Setup: Primary Key=. It cannot be zero or empty.

I am not too sure if the error stems from my code, and if it is I am not sure where to find the file that causes this.

  • Suggested answer
    Vaishnavi J Profile Picture
    3,096 on at

    Hi,

    In your Sales & Receivable Setup.

    Add the date that you want to delete the record. It is standard error.

    if the posting date of PSI was 15th March 2022 then added 16th March 2022 date in allow document deletion before field.

    pastedimage1654883973069v1.png

    But why do you want to delete the posted documents. since it has affected the GL entry already this can cause issue when auditing.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • jdrco Profile Picture
    485 on at

    Thanks for getting back to me. I am just messing around in my sandbox. I am testing a report based on posted sales invoices and I forgot to input some necessary data in the certain fields. Thank you for the warning also

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

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 674 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 362 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 359 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans