Notifications
Announcements
No record found.
Hi,I would like to know if after Unified interface transition there is a way to achieve the entityRowVersion on WebResources, as could be done before with: "window.parent.Xrm.Page.data.entity.getRowVersion()"? Thx
Hi Alexandre,
What exactly are you trying to achieve?Does it have to do with grids and subgrids? If yes, the supported Client APIs are documented here:Grids and subgrids in model-driven apps for Dynamics 365 - Power Apps | Microsoft Docs
If it's more about Xrm.Page, although it is deprecated, parent.Xrm.Page will continue to work in case of HTML web resources embedded in forms as this is the only way to access the form context from the HTML web resource:Important changes (deprecations) coming in Power Apps, Power Automate and customer engagement apps - Power Platform | Microsoft Docs
Henry
Thx for feedback Henry Jammes.
My concerns are about parent.Xrm.Page. Altough it will continue to work, the information that can be obtained using it got some modifications, and now I can't find a way to get the rowVersion information as I could do previously with "window.parent.Xrm.Page.data.entity.getRowVersion()".
The getRowVersion Client API isn't documented (and so is unsupported).
Can you share a bit more on why you're using it?
I am using RowVersion property for concurrency purposes. I pass the rowVersion value in a HTTP request, and so my API can then compare when trying to get/update the entity record if no changes occurred since the HTTP request was performed.
Like Henry mentioned, looking into the documentation Client API Reference for model-driven apps - Power Apps | Microsoft Docs it isn't being referenced in any place about getRowVersion() for the Xrm.Page, which means it is an internal function that was accessible in WebClient but not anymore in Unified interface and it was being used in an unsupported way.
I would recommend you to have a look into this https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/perform-conditional-operations-using-web-api#apply-optimistic-concurrency and apply this new kind of logic to your development.
When a User opens a record you should get that "@odata.etag": "W/"470867", when the user changes and submits it, you should add to the request the If-Match on the update request, then it can be validated if the user is updated "his" version of the record, if it fails, then it isn't the same version.
Retrieve an account sample:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/retrieve-entity-using-web-api#retrieve-specific-properties
You also need to be sure that the Entity has Optimistic concurrency enabled
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/perform-conditional-operations-using-web-api#entity-must-have-optimistic-concurrency-enabled
Thx Miguel Beja,
Can you tell me if the mentioned ETag can be used also with .NET OrganizationService (Microsoft.Xrm.SDK) ? My API is using it to update entities and I would like to keep using it.
Hi, RowVersion for OrganizationService is still going to work. What you mentioned in the beggining was regarding JavaScript for WebResourecs right?
Not sure if the Etag is going to be the same but you can test it.
docs.microsoft.com/.../entity-operations-update-delete
For Plugin you need to do the UpdateRequest or DeleteRequest and take into consideration doing this: ConcurrencyBehavior = ConcurrencyBehavior.IfRowVersionMatches.
The documentation above has sample.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 47 Most Valuable Professional
André Arnaud de Cal... 38 Super User 2025 Season 2
Pallavi Phade 32