Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Understanding Xrm.Page Client-Side Model In Dynamics 365 CRM

(1) ShareShare
ReportReport
Posted on by

It’s not possible to interact with form objects using simple javascript in a supported way. Microsoft Dynamics CRM provides an object model of form elements that can be utilized to manipulate data, change form object properties, or analyze the current state of the form or data within the form. This object model is called Xrm.Page

Following is the Xrm.Page object’s hierarchy showing the available namespaces, objects, and their collections. You will be using these properties while writing JScript code:

Following are the things you can do with Xrm.Page model :

  • Change the appearance or manipulate form objects like data controls (text boxes, checkboxes, etc.), tabs, sections, etc.
  • Identify elements to show/hide.
  • Specify names of objects from which to retrieve/store data values.
  • Provide namespaces to properties so the system allows multiple controls per field or multiple forms per entity.

 Xrm.Page provides a namespace container for three objects described in the following table:

Namespces

Execution context

When you register a function for an event handler you have the option to pass an execution context object as the first parameter to the function as shown in below image. This object contains methods that allows you to manage variables you wish to share with other event handlers and the save event.

Below is the image how you pass execution context to javascript function

Xrm.Page.context

Following are some examples of common context methods:

1. getOrgUniqueName:

Returns the unique text value of the organizations' name. [Continue Reading]

*This post is locked for comments

  • Arun Vinoth Profile Picture
    11,615 Moderator on at
    RE: Understanding Xrm.Page Client-Side Model In Dynamics 365 CRM

    Hi, Welcome to Dynamics Community.

    The purpose of this forum is about posting problem that community members are facing & getting solutions/workarounds from other community members.

    May be you can post your above content as a blog in this community. Thanks for understanding.

    To learn more about blogging on the community please review our Request a New Blog wiki here:

    community.dynamics.com/.../136.request-a-new-blog-or-blog-to-syndicate

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans