Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Error using Purchase Invoice Web Service 'Delete'

(0) ShareShare
ReportReport
Posted on by 40

I have an integration that adds Purchase Invoices. In the event of an error after the header create I need to delete the partially created Invoice. When I call the Delete function I get an error "Other user has modified "Purchase_Invoice" "Document Type=CONST(Invoice),No.=CONST(2354)"

I have tried reading the Invoice prior to deleting and re-connecting to the WebService prior to the delete but always get the same error when I try to delete. Could it have to do with the fact that there are no line, in the case of a failure on the header update or empty lines in the case of a failure on updaing the line values

Any ideas?

*This post is locked for comments

  • Gabsi Mohamed Profile Picture
    Gabsi Mohamed 819 on at
    Re: Error using Purchase Invoice Web Service 'Delete'

    hello  Mike,

    several times, I encountered the problem.

    I suggest you create a codeunit  function that accepts as a parameter (key of the row that you want to delete) .

    in the fonction's body , select the ligne and delete.

    try your function first in the onrun of code unit.

    in your web app, just call the function and give it the key parameter.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans