PIRATED 20130912 0919

PIRATED 20130912 0919

NOTE: This content appears to have been plagiarized. Please leave a comment or email tnwiki at Microsoft (with a link to this article) if we are mistaken. The content was pulled from the following source:
The community rules state:
  • "Someone else has relevant content and you want to help them share it with the world. It's a nice thought, but do not copy other people's content to the Wiki, even if the owner said it was OK."



Xrm.Page.context Methods

  • getAuthenticationHeader: A deprecated method that returns the encoded SOAP header necessary to use Microsoft Dynamics CRM Web Service calls using Jscript.
  • getCurrentTheme: Returns a string representing the current Microsoft Office Outlook theme chosen by the user.
  • getOrgLcid: Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the base language for the organization.
  • getOrgUniqueName: Returns the unique text value of the organization name.
  • getQueryStringParameters: Returns an array of key value pairs representing the query string arguments that were passed to the page.
  • getServerUrl: Returns the base server URL. When a user is working offline with the Microsoft Dynamics CRM for Microsoft Office Outlook, the URL is to the local Microsoft Dynamics CRM Web Services.
  • getUserId: Returns the GUID value of the SystemUser.Id value for the current user.
  • getUserLcid: Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the user selected as their preferred language.
  • getUserRoles: Returns an array of strings representing the GUID values of each of the security roles that the user is associated with.
  • isOutllookClient: Returns a Boolean value indicating if the user is using Microsoft Dynamics CRM for Microsoft Office Outlook.
  • isOutlookOnline: Returns a Boolean value indicating whether the user is connected to the Microsoft Dynamics CRM server while using Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access. When this function returns false, the user is working offline without a connection to the server. They are interacting with an instance of Microsoft Dynamics CRM running on their local computer.
  • prependOrgName: Prepends the organization name to the specified path.

Xrm.Page.data.entity Attribute Methods

  • addOnChange: Attribute Types (All). Sets a function to be called when the attribute value is changed.
  • fireOnChange: Attribute Type (All). Causes the OnChange event to occur on the attribute so that any script associated to that event can execute.
  • getAttributeType: Attribute Type (All). Returns a string value that represents the type of attribute.
  • getFormat: Attribute Type (All). Returns a string value that represents formatting options for the attribute.
  • getInitialValue: Attribute Type (boolean, optionset). Returns the initial value for Boolean or optionset attributes.
  • getIsDirty: Attribute Type (All). Returns a Boolean value indicating if there are unsaved changes to the attribute value.
  • getMax: Attribute Type (money, decimal, integer, double). Returns a number indicating the maximum allowed value for an attribute.
  • getMaxLength: Attribute Type (string, memo). Returns a number indicating the maximum length of a string or memo attribute.
  • getMin: Attribute Type (money, decimal, integer, double). Returns  a number indicating the minimum allowed value for an attribute.
  • getName: Attribute Type (All). Returns a string representing the logical name of the attribute.
  • getOption: Attribute Type (optionset). Returns an option object with the name matching the argument passed to the method.
  • getOptions: Attribute Type (optionset). Returns an array of option objects is representing the valid options for an optionset attribute.
  • getParent: Attribute Type (All). Returns the entity object that is the parent to the attribute.
  • getPrecision: Attribute Type (money, decimal, integer, double). Returns the number of digits allowed to the right of the decimal point.
  • getRequiredLevel: Attribute Type (money, decimal, integer, double). Returns a string value indicating whether a value for the attribute is required or recommended.
  • getSelectedOption: Attribute Type (optionset). Returns the option object that is selected in an optionset attribute.
  • getSubmitMode:  Attribute Type (All). Returns a string indicating when data from the attribute will be submitted when the record is saved.
  • getText: Attribute Type (optionset). Returns a string value of the text for the currently selected option for an optionset attribute.
  • getUserPrivilege: Attribute Type (All). Returns an array of privileges that contain Boolean values indicating if the user can create, read, or update data values for an attribute.
  • getValue: Attribute Type (All). Returns the data value for an attribute.
  • removeOnChange: Attribute Type (All). Removes a function from the OnChange event handler for an attribute.
  • setRequiredLevel: Attribute Type (All). Sets whether data is required or recommended for the attribute before the record can be saved.
  • setSubmitMode: Attribute Type (All). Sets whether data from the attribute will be submitted when the record is saved.
  • setValue: Attribute Type (All). Sets the data value for an attribute.

Xrm.Page.data.entity Methods

  • addOnSave:  Sets a function to be called when the record is saved.
  • getDataXml: Returns a string representing the xml that will be sent to the server when the record is saved.
  • getEntityName: Returns a string representing the logical name of the entity for the record.
  • getId: Returns a string representing the GUID id value for the record.
  • getIsDirty: Returns a Boolean value that indicates if any fields in the form have been modified.
  • removeOnSave: Removes a function from the OnSave event handler. 
  • Save: Saves the record. This method has three possible parameters.

Form Event Handler Execution Context Reference

  • getContext: Returns the Xrm.Page.context object.
  • getDepth: Returns a value that indicates the order in which the handler is executed.
  • getEventArgs: Returns an object with methods to manage the Save event.
  • getEventSource: Returns a reference to the object that the event occurred on.
  • getSharedVariable: Retrieves a variable set using setSharedVariable.
  • setSharedVariable: Sets the value of a variable to be used by a handler after the current handler completes.

Xrm.Page.ui Methods

  • close: Close the form.
  • getCurrentControl: Returns the control object that currently has focus on the form.
  • getFormType: Indicates the form context for the record.
  • getViewPortHeight: Returns the height of the viewport in pixels.
  • getViewPortWidth: Returns the width of the viewport in pixels.
  • refreshRibbon: Causes the ribbon to re-evaluate data that controls what is displayed in it.

Xrm.Page.ui Control Methods

  • addCustomView: Control Type (Lookup). Add a new view for the lookup dialog.
  • addOption: Control Type (Option Set). Adds an option to an Option Set control.
  • clearOptions: Control Type (Option Set). Clears all options from an Option Set control.
  • getAttribute: Control Type (Standard, Lookup, OptionSet). Returns the attribute that the control is bound to.
  • getControlType: Control Type (All). Returns a value that categorizes controls.
  • getData: Control Type (Silverlight Web resources). Returns the value of the data query string parameter passed to a Silverlight Web resources.
  • getDefaultView: Control Type (Lookup). Returns the ID value of the default lookup dialog view.
  • getDisabled: Control Type (All except SubGrid). Returns a value that indicates whether the control is disabled.
  • getLabel: Control Type (All). Returns the label for the control.
  • getName: Control Type (All). Returns the name assigned to the control.
  • getParent: Control Type (All). Returns a reference to the section object that contains the control.
  • getSrc: Control Type (IFrame, Web Resource). Returns the current URL being displayed in an IFRAME.
  • getInitialUrl: Control Type (IFrame). Returns the default URL that an IFrame control is configured to display.
  • getObject: Control Type (IFrame, Web resource). Returns the object in the form representing an IFrame or Web resources.
  • getVisible: Control Type (All). Returns a value that indicates whether the control is currently visible.
  • refresh: Control Type (SubGrid). Refresh the data displays in a Sub-Grid.
  • removeOption: Control Type (Option Sets). Removes an option from an Option Set control.
  • setData: Control Type (Silverlight Web resources). Sets the value of the data query string parameter passed to a Silverlight Web resource.
  • setDefaultView: Control Type (Lookup). Sets the default view for the lookup control dialog.
  • setDisabled: Control Type (All except Web Resources and SubGrid). Sets a value that indicates whether the control is disabled.
  • setFocus: Control Type (All). Sets the focus on the control.
  • setLabel: Control Type (All). Sets the label for the control.
  • setSrc: Control Type (IFrame and Web Resource). Sets the URL to be displayed in an IFrame.
  • setVisible: Control Type(All). Sets a value that indicates whether the control is visible.

Xrm.Page.ui.controls Collection Methods

  • forEach: Applies the action contained within a delegate function.
  • get: Returns one or more controls depending on the arguments passed.

 

Argument

Return Value

Type

None

All the controls

Array

String

The control that matches the name.

Object

  • getLength: Returns the number of controls in the collection.

Xrm.Page.ui.navigation.items Collection Methods

  • forEach: Applies the action contained within a delegate function.
  • get: Returns one or more navigation items depending on the arguments passed.

 

Argument

Return Value

Type

None

All the navigation items         

Array

String

The item that matches the name

Object

Number

The item that matches the index

Object

Delegate function

(attribute, index)

Any navigation items causing the delegate function to return true.

Array

  • getLength: Returns the number of navigation items in the collection.

Xrm.Page.ui.formSelector.items Collection Methods

  • forEach: Applies the action contained within a delegate function.
  • get: Returns one or more roleForms.

 

Argument

Return Value

Type

None

All the items

Array

String

The item that matches the name

Object

Number

The item that matches the index

Object

Delegate function

(attribute, index)

Any items that cause the delegate function to return true.

Array

  • getLength: Returns the number of roleForms in the collection.

Xrm.Page.ui.formSelector members

  • items: Type (collection). A collection of all the form items accessible to the current user.
  • getCurrentItem: Type (Method). Returns a reference to the form currently being shown.

Xrm.Page.ui.tabs Collection

  • forEach: Applies the action contained within a delegate function.
  • get: Returns one or more tabs.

 

Argument

Return Value

Type

None

All the tabs

Array

String

The tab that matches the name

Object

Number

The tab that matches the index

Object

Delegate function

(attribute, index)

Any tabs that cause the delegate function to return true.

Array

  • getLength: Returns the number of tabs in the collection.

Xrm.Page.data.entity.attributes Collection Methods

  • forEach: Applies the action contained within a delegate function.
  • get: Returns one or more attributes.

 

Argument

Return Value

Type

None

All the attributes

Array

String

The attribute that matches the name

Object

Number

The attribute that matches the index

Object

Delegate function

(attribute, index)

Any attribute that cause the delegate function to return true.

Array

  • getLength: Returns the number of items in the collection.

           

Leave a Comment
  • Please add 1 and 7 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Carsten Siemens edited Revision 2. Comment: Pirated Content - see my comment

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Carsten Siemens edited Revision 2. Comment: Pirated Content - see my comment

  • NOTE: This article was reported as Pirated/Plagiarized Content (content you didn't write) and will be removed. Please do not steal content from others. If you feel we are mistaken, please leave a comment or email tnwiki at Microsoft with a link to this article and with clear and detailed reasons why you own the content or have explicit permission from the author.

    Content was taken from: "Microsoft Dynamics CRM 2011 JavaScript Development Reference"

    Published by Daniel H. on April 9, 2012

    www.hodgin.ca/.../microsoft-dynamics-crm-2011-javascript-development-reference

Page 1 of 1 (2 items)