Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

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

$
0
0

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]


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>