webchanges resource type
Represents a web change in Business Central. The web change logs any modifications to a record. This includes when a record is created, updated, or deleted, resulting in a corresponding log entry being generated.
Note
For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.
Methods
| Method | Return Type | Description |
|---|---|---|
| GET webChanges | webChanges | Gets a webChanges object. |
Properties
| Property | Type | Description |
|---|---|---|
| 🔑 id | GUID | The unique ID of the web change. Non-editable. |
| entryNumber | integer | Specifies the entry number. |
| tableNumber | integer | specifies the table number of the changed record |
| recordDesignation | string | Specifies the record designation of the changed record. |
| recordDesignationId | GUID | Specifies the id of the changed record. |
| primaryKey1 | string | Specifies the first primary key field of the changed record. |
| primaryKey2 | string | Specifies the second primary key field of the changed record. |
| primaryKey3 | string | Specifies the third primary key field of the changed record. |
| deleted | string | Specifies whether the record was deleted |
| createdAt | dateTime | Specifies the timestamp of the change. |
Best practice
How to use
The client typically checks at regular intervals whether new entries exist in the WebChanges table. If new entries are available, the server will return them in the response.
To ensure the server skips already sent entries and only delivers the latest changes, the client must keep track of the last received entry number with each request. This last entry number is then included as a filter condition in the subsequent requests.
Example:
GET https://{businesscentralPrefix}/companies({id})/webChangesWebCon?$filter=entryNumber gt {lastEntryNo}
Supported Tables
The following tables are supported and logged by default in the WebChanges table:
| Number | Name |
|---|---|
| 18 | Customer |
| 27 | Item |
| 36 | Sales Header |
| 222 | Ship-to Address |
| 5050 | Contact |
| 5401 | Item Variant |