Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Can't delete a Posted Sales Invoice error

Posted on by 479

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.

  • jdrco Profile Picture
    jdrco 479 on at
    RE: Can't delete a Posted Sales Invoice error

    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

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: Can't delete a Posted Sales Invoice error

    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

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans