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,
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, 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.
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 Alexandre,
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:
You also need to be sure that the Entity has Optimistic concurrency enabled
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.
The getRowVersion Client API isn't documented (and so is unsupported).
Can you share a bit more on why you're using it?
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()".
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,326 Super User 2024 Season 2
Martin Dráb 228,166 Most Valuable Professional
nmaenpaa 101,148