web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Permission to modify entry

(0) ShareShare
ReportReport
Posted on by 555

Hi experts,

I use NAV 2016.

I need to change a few fields on a single Item Ledger Entry record.

I have made a new codeunit that would do the trick, if only I had the permissions to modify Item Ledger Entry.

I am SUPER.

When I try to add the Modify permission to the properties of the codeunit, it says that I do not have permissions to modify that record.

What am I doing wrong?

(I have also tried to put my code in OnOpen on the Item Card page. There I can add the permissions, but when I open the page, I get the same error.)

Hope you can help...

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi,

    Please open your Codeunit and go the Codeunit Property and provide the Permission property with your Table - Item Ledger Entry.

    pastedimage1660825608148v1.png

  • Morten Steengaard Profile Picture
    555 on at

    Hi Nitin,

    If I enter "TableData Item Ledger Entry=m" and save my codeunit, it says something like "You do not have permissions to modify records in the table Item Ledger Entry".

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Please try to give permission = rm

    Thanks.

  • Morten Steengaard Profile Picture
    555 on at

    Now I have tried with rm, rimd and m. Same result.

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Have you written your code to modify ILE into custom CU?

    Please share your code.

    Thanks.

  • Morten Steengaard Profile Picture
    555 on at

    Yes, I have made a new codeunit - number 50002:

    pastedimage1660828162897v1.png

    It only contains this code:

    ItemLedgerEntry.SETFILTER("Entry No.", '1336812');

    IF ItemLedgerEntry.FINDSET(TRUE) THEN
      REPEAT
        ItemLedgerEntry."Remaining Quantity" := 0;
        ItemLedgerEntry.Open := TRUE;
        ItemLedgerEntry.MODIFY;
      UNTIL ItemLedgerEntry.NEXT = 0;

    If I out comment this code, I still get the error, when trying to save the codeunit.

  • Suggested answer
    YUN ZHU Profile Picture
    95,718 Super User 2025 Season 2 on at

    Hi, Does the user performing the operation have Super permission? Nitin's suggestion is absolutely correct, you can follow Codeunit 80's practice. The same error will also be prompted if the user has insufficient permissions.

    PS: Personally do not recommend doing this, it will destroy the consistency of the data.

    Alternatively, you can modify the data directly in SQL.

    pastedimage1660865431781v1.png

    Hope this helps as well.

    Thanks.

    ZHU

  • Morten Steengaard Profile Picture
    555 on at

    Hi ZHU,

    Thank you for your reply.

    On a Danish forum, I have been told that some tables have special permissions. The problem in my case was that I did not have the developer licens installed at the time.

    I totally agree with you, that this kind of programming is not recommended. I only do this in order to fix an inconsistency of the data, that a bug in a program has made.

    Thank you both ZHU and Nitin.

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Pls use Dev License for doing the above activity.

    Regards

    Amit Sharma

    www.erpconsultors.com

    https://www.linkedin.com/in/amit-sharma-94542440/

    Press Yes if Info is useful.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    If you do not have a dev license / partner license you can modify the field directly on the SQL server as long as it is not a flow field.

    But you really need to know that you do not do any changes that make things worse by creating even more inconsistency.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,664

#2
YUN ZHU Profile Picture

YUN ZHU 960 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans