Dynamics 365 Business Central: Insert/Modify/Delete table data directly in Web Client???

Dynamics 365 Business Central

Hi, Readers.
This morning, I made a cup of coffee first as always, opened Twitter, and immediately found a very interesting discovery from Teddy. We can edit Business Central table data directly in Web Client???

First of all I am certainly skeptical, because in order to maintain data integrity this should not be allowed. After my testing, this is indeed possible.😮 So in this post, I would like to talk more about this too.

Important: It is not recommended to change data in the tables directly as it will cause inconsistency in database

First, in NAV we can open the table directly from the Development Environment to edit the data directly.

Test Video:

But that’s not possible with Business Central. As you might know, we can add the table=<TableID> parameter to the client’s address (URL), replacing <TableID> with the ID of the table that we want to view.

For example, if your URL starts with https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox20, then to view table 18 Customer in your current company, you could use the following URL:

https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox20?table=18

The table appears as read-only in the client, so modifications, insertions, and deletions cannot be made.

More deitals: Viewing Table Data

Then it is similar to opening the table directly, we can open Business Central tablet client in a browser by adding /tablet parameter to the url.

More details: Opening the Business Central Tablet or Phone Client from a Browser

To openURLExample
The Role Center for the default companyhttps://ComputerName:Port/WebServerInstance/tablet

Or (for multitenant deployments)

https://ComputerName:Port/WebServerInstance/tablet?tenant=TenantID
https://MyBCWeb:8080/BC190/tablet
The Role Center for a specific companyhttps://ComputerName:Port/WebServerInstance/tablet?company=CompanyName

Or

https://ComputerName:Port/WebServerInstance/tablet?tenant=TenantID&company=CompanyName
https://MyBCWeb:8080/BC190/tablet?company=CRONUS%20International%20Ltd.
A specific pagehttps://ComputerName:Port/WebServerInstance/tablet?page=ID

Or

https://ComputerName:Port/WebServerInstance/tablet?tenant=TenantID&page=ID
https://MyBCWeb:8080/BC190/tablet?page=22
A specific reporthttps://ComputerName:Port/WebServerInstance/tablet?report=ID

Or

https://ComputerName:Port/WebServerInstance/tablet?tenant=TenantID&report=ID
https://MyBCWeb:8080/BC190/tablet?report=8
A specific profilehttps://ComputerName:Port/WebServerInstance/tablet?profile=ProfileID

Or

https://ComputerName:Port/WebServerInstance/tablet?tenant=TenantID&profile=ProfileID
https://MyBCWeb:8080/BC190/tablet?profile=Small-Business

Okay, when we put those two things together, something magical happened.

Open the table directly by Business Central tablet mode in a browser:
For example:
https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox20/tablet?table=18

Then we can see that, the table is opened in edit mode as in NAV.😑

Test Video:

As Teddy mentioned this may be a bug, but it still works for now, you can try it in your test environment.
Test date: 2022/05/10
Test version:
Cloud: W1 20.0 (Platform 20.0.37114.40239 + Application 20.0.37253.38055)
On-Pre: W1 20.0 (Platform 20.0.37114.38150 + Application 20.0.37253.38230)

PS:
1. Currently this method works in both Chrome and New Edge.

2. In addition to editing records, you can also delete and add new records.

3. Also works in On-Premises version.

4. Posted data can also be edited.

5. You can use Page Inspection to find table ID.
More details: Inspecting Pages in Business Central

6. We have previously discussed how to create an Run Object Tool for Business Central. Using the above method, we can also create a tool for editing table data, but this is not recommended, so we will not discuss it in depth this time.
More details: Run Object Tool (Table, Page, Query, Report, XMLport)

7. I got some feedback. Some historical table like Sales Invoice Header and Line (112 & 113) are still show on view mode for Business Central. This is the same behavior as running the table directly in the NAV development environment. (But in NAV if you have a development license, this should be also editable)

END

Hope this will help.

Thanks for reading.

ZHU

コメント

タイトルとURLをコピーしました