Skip to main content

Notifications

Business Central forum

Edit Posted sales invoice

Posted on by 110

I want to add business posting group to the existing sales invoice header & sales invoice line table.

  • sales invoice header (Table Id- 112) 
  • sales invoice line (Table Id -113)

I have added the following permission set to a super user.

2019_2D00_08_2D00_25_5F00_10_2D00_34_2D00_05.png

Added this permission to the super user.

Now, When I want to modify the invoice header & line I got the following error.

2671.png.

You do not have the following permission on TableData Sales Invoice Header: Modify.

How can I get the permission to modify the above 2 tables.

Categories:
  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Edit Posted sales invoice

    Just create a Sales Credit Memo manually and apply it. It's much better and faster than trying to edit the posted sales invoice. Especially if this is just a one-off.

  • Rana Hamid Profile Picture
    Rana Hamid 110 on at
    RE: Edit Posted sales invoice

    Need to cancel/ credit memo some of the posted sales invoice. When I want to do this, the above error occurred.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Edit Posted sales invoice

    Then I have to ask. Why is that important?

    The Posted Invoice Header and Lines table exist only for one purpose, and that is to be able to recreate (print) a historic Invoice.

    As soon as the Invoice has been printed once (the "Printed" field > 0), the Posted Invoice can be deleted.

    A Posting group field, that is empty has no significance whatsoever.

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Edit Posted sales invoice

    If it's a one-off thing, you can create a codeunit to update that.

    Or just leave it as it is. I don't think it will cause an issue.

  • Rana Hamid Profile Picture
    Rana Hamid 110 on at
    RE: Edit Posted sales invoice

    Don't know how its posted. But, from the exported table, I can see that the posting group is empty. Thats why I need to add at least one posting group to that field. And, there is only one posting group.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Edit Posted sales invoice

    You can modify selected information on posted documents, and entries. It is even implemented in the standard application. Look at how you can change the Due Date field on Customer G/L Entries for example.

    However, you should be very cautious, if you implement such a function at a customer site, for the reasons mentioned in the two previous posts.

    But, to do it you need to create object, for example a page, where you allow the user to input the information to change. The page object must have the permission to change the posted invoice header, and also the user must have the permission. You could say, that the user brings half the permission, and the object brings the other half, so in combination the change is allowed. This way you can alsy, by setting up permissions, decide which users are allowed to make changes to posted documents.

    For inspiration, check out how Microsoft have implemented the possibility to change Due Date and On Hold in, for example. There the page itself has the permissions to modify existing Ventor Entries, and the majority of controls on the page are write protected (Editable = FALSE). However, the fields, that the user must be allowed to change are Editable = TRUE

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Edit Posted sales invoice

    User shouldn't be allowed to modify posted document for audit purpose. That is why it is being restricted that way. Why do you want to change the Business Posting Group ? Business Posting Group has an impact on the GL that got posted. If you change that, you will lose your audit trail.

  • Suggested answer
    Peter Zentner Profile Picture
    Peter Zentner 390 on at
    RE: Edit Posted sales invoice

    You cannot modify posted documents, since they are just that: posted documents that are not supposed to be modified. Especially anything that would change the amounts or the accounts the data was posted to should not be changed. If you want to change some descriptive fields that do not change anything "of importance", you can do that, but you have to follow the same pattern that is used anywhere else in the system.

    You have to make the changes in a codeunit (preferably) that you are giving specific modify permissions to those objects. You would define this in the "Permissions" properly of the codeunit. In this case, you would define TableData "Sales Invoice Header" = rm; (for read and modify).

    But you have to be very careful, especially with changing posting groups - those are used to determine the accounts used for posting and, if you change them, you might not have a clean audit trail anymore what was posted where and why.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans