web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Xrm.Constants

(0) ShareShare
ReportReport
Posted on by 2

What is Xrm.Constants ?
Is it depreciated? if yes what is alternative for same

I have the same question (0)
  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at
    Re: Xrm.Constants

    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

  • ivan_apps Profile Picture
    2,187 Moderator on at
    Re: Xrm.Constants

    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

     

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at
    Re: Xrm.Constants

    Agree with @cchannon. It's probably a custom library that was added as a custom web resource. 

  • A__K Profile Picture
    2 on at
    Re: Xrm.Constants

    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

  • cchannon Profile Picture
    4,702 Moderator on at
    Re: Xrm.Constants

    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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard