If you are seeing a form with ‘Unsaved’ tag and wondering how to figure out what field got updated with JavaScript, a simple way is to go to Console prompt and run :
Xrm.Page.data.entity.getDataXml()
formContext.data.entity.getDataXml()
This will returns a string representing the XML that will be sent to the server when the record is saved.

For more detail about the API, refer https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-data-entity/getdataxml
