Notifications
Announcements
What is Xrm.Constants ?Is it depreciated? if yes what is alternative for same
To my knowledge, there is no such thing. The Xrm namespace is in the client webapi, and yes, that namespace is being steadily phased out of the product, but there is no such object as Xrm.Constants in there.
Client API Reference for model-driven apps - Power Apps | Microsoft Learn
Where did you come across this? The closest I can think of is possibly a shared variable in JavaScript or simply defining const variables in your javascript namespace.
https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/executioncontext/getsharedvariable
Agree with @cchannon. It's probably a custom library that was added as a custom web resource.
I came across old CRM Code in which Xrm.Constants is used to store some value and then use the same in other entity form like string parameter.Ex: on load of Account Entity Xrm.Constants.AccountName is used to save AccountName and when user open related contact record Xrm.Constants.AccountName can be used in contact form/control event to get AccountName
That must be some custom library in formscript. There is no such namespace in the client API.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268