D365 Business Central : Edit Table Data Directly

D365 Business Central does not allow you to directly modify the table data, especially for Cloud SaaS customers. There are some good reasons why we are not supposed to do that, such as for safety, consistency, audit, etc. Tempering the table data without knowledge on how the system works can cause you more issues at the end.

However, what if we know what we are doing and we want to fix the data ?

There are few ways you can fix the data, either by creating a page to expose the data, creating a process (report, etc) to fix data programmatically, or using configuration package.

One of the hidden trick is to use the tablet view to access the table.

Before we talk about editing the data, we need to know how to manipulate our Business Central Web Client URL. According to Microsoft documentation website, this is the web client has the following syntax.

https://<hostname>[/<aadtenantid>][/<environmentname>]/?[company=<companyname>]&[page|query|report|table=<ID>]&[tenant=<tenantID>]&[mode=<View|Edit|Create>]&[profile=<profileID>]&[customize]&[bookmark=<bookmark>]&[captionhelpdisabled=<0|1>]&[showribbon=<0|1>]&[shownavigation=<0|1>]&[showuiparts=<0|1>]&[showheader=<0|1>]&[isembedded=1]&[pagesize=<number of lines>]&[redirect<0|1>]&[extension=<extensionID>]

Let’s focus on the table syntax. Consider below URL is our Business Central URL.

https://businesscentral.dynamics.com/abcdefgh-abcd-1234-1111-abcdefgh1234/Production

If we want to access table Item (27) directly, we will need to add ?table=27 to the URL.

https://businesscentral.dynamics.com/abcdefgh-abcd-1234-1111-abcdefgh1234/Production?table=27

We can see that we are accessing the table data directly in read only view. You will be able to see all the fields inside the table.

If you don’t know the table number, you can use Page Inspection to inspect the page and find out about the table number.

Viewing the table data in read only mode is easy, but what if you want to edit the table data ? The trick is to use Tablet mode.

D365 Business Central has a way to simulate tablet mode in PC browser. We use this tablet mode to test how Business Central will look like when we access it from a tablet.

We can do this by adding /Tablet to the web client URL.

https://businesscentral.dynamics.com/abcdefgh-abcd-1234-1111-abcdefgh1234/Production/Tablet

What if you combine both the table number and tablet mode ?

https://businesscentral.dynamics.com/abcdefgh-abcd-1234-1111-abcdefgh1234/Production/Tablet?table=27

You would expect a read-only view on tablet view, but you can actually edit the table data. You can even create new record and delete.

Is this a bug ? Or a hidden feature ? Not sure, but use it carefully. With great power comes great responsibility.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

12 Responses

  1. Abidi NOurhene says:

    Hello
    Thanks for sharing I’m not sure that this manipulation works for on premise BC version
    I used to test but it doesn’t work in fact runing table on tablet mode still display data on view mode only

    Best Regards

  2. mohammad rizki maulana says:

    Hi Teddy,

    Thanks for sharing.
    I have tested and it’s works for table that allow for insertion.
    But, it seems not working for historical table such as Item Ledger Entry (32), Sales Invoice Header (112).
    So, it’s not 100% working like we are accessing the table from NAV development.

    Regards,

    Rizki

    • thatnavguy says:

      Similar to the standard function, all posted documents and ledger entries are protected. You can only edit through an object (such as codeunit) with indirect permission.
      I am actually glad that it is blocked, otherwise user can easily make irreparable damages.

      • mohammad rizki maulana says:

        Thanks for clarified about the development license.
        Some ledger entries table are restricted, such as ILE. but, some ledger entries like CLE/VLE are editable for some fields.

        Still expecting BC SaaS has a door to apply a developer license, to make a required changes. In very specific case, this process is good practical and fasten to resolve client problem.

        Thank you.

  3. Max Rich says:

    hey Teddy,
    thank you for the highlight, but I found the original post from the beyondit blog:
    https://www.beyond365.de/post/edit-records-directly-in-bc

  4. Yani says:

    Hi Teddy,
    Thanks alot for this great tips. But we found it works on some PC while other not, for the same database, company, browser and same user ID. Would you happen to know what could cause that?
    And also, thus this works for on cloud Azure subscription? We tried but it is on view mode only.

    Best regards,

    Yani

    • thatnavguy says:

      Hi Yani,

      There are lot of variations to this, such as whether you are in OnPrem or SaaS, the license that you are using, or the browser version and status, etc.
      That’s why we can consider this a bug that Microsoft will probably be patched in the future.

  5. Dmytro says:

    Hi Teddy,

    It doesn’t work for now on cloud. Only reading 🙁

    Best Regards,
    Dmytry

  6. angelo theus says:

    Hi Teddy,

    Mantap bener….Hidden treasure 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *