formContext.data.entity (Client API reference)
Provides properties and methods to retrieve information specific to the record displayed on the page, the save method, and a collection of all the columns included in the form. Column data is limited to columns represented on the form.
Note
Unsure about entity vs. table? See Developers: Understand terminology in Microsoft Dataverse.
Properties
| Name | Description |
|---|---|
| attributes | Collection of columns for a record displayed on the form. More information: Collections and Columns. |
Methods
| Name | Description |
|---|---|
| addOnSave | Adds a function to be called when the OnSave event is triggered. The event occurs before the save occurs, giving the handler an option to cancel the save operation. |
| addOnPostSave | This method is used to support or execute custom logic using web resources to perform after Save actions when the save event is successful or failed due to server errors. |
| getDataXml | Returns a string representing the XML that will be sent to the server when the record is saved. Only data in columns that have changed or have their submit mode set to "always" are sent to the server. |
| getEntityName | Returns a string representing the logical name of the table for the record. |
| getEntityReference | Returns a lookup value that references the record. |
| getId | Returns a string representing the GUID value for the record. |
| getIsDirty | Gets a boolean value indicating whether any columns in the form have been modified. |
| getPrimaryAttributeValue | Gets a string for the value of the primary column of the table. |
| isValid | Gets a boolean value indicating whether all of the table data is valid. |
| removeOnSave | Removes a function to be called when the record is saved. |
| save | Saves the record synchronously with the options to close the form or open a new form after the save is completed. |
Related topics
Feedback
Submit and view feedback for