Microsoft Dynamics CRM 2013 Navigation

Most of the Microsoft Dynamics CRM 2013 Customers find the navigation on Dynamics CRM 2013 a bit hard to get used to. They liked the side bar links on 2011.  It is great to discover the use of the mouse-wheel to scroll the menu. But still it's not easy to use.

Microsoft Dynamics CRM Navigate is a solution that displays all Dynamics CRM 2013 SiteMap on the same page.
Users can create and edit own Sitemap visualization.
Users can also search inside siteMap
Support of IE9 Plus

Install Instructions
1. Install solution
2. Go to configuration page and click install

3. Add  security role to all users by clicking "Assign All"

https://drive.google.com/file/d/0ByYa7z_UJpVLS0t6WW1wOXRTX28/edit?usp=sharing

 

Getting parent attributes via Javascript Web Services call

Easy to use JavaScript Retrieve and RetrieveMultiple functions

گاهی اوقات نیاز دارید که هنگامی که مثلا یک فیلد Lookup را مقدار دهی میکنید، مقادیری از دیگر فیلدهای  رکورد انتخاب شده در آن فیلد در توابع جاوا مورد استفاده قرار گیرد یا در فیلد های فرم حاظر به نمایش در آیند که در CRM 2013 این کار به راحتی با ایجاد Quick Create Form قابل انجام است اما با استفاده از توابع زیر امکان Retieve  کردن فیلد های مختلف از یک رکورد Lookup شده امکان پذیر میشود.

در مثال زیر فیلد شماره موبایل یک Contact که loockup شده است Retrieve  میگردد

من از SOAP استفاده کردم اما اینکار را با REST و JSON هم میتونیم به راحتی انجام بدیم. RESTKit.js توابع Retrieve , RetrieveMultiple ,Insert,Delete, Update  را به صورت آماده در کتابخانه خود دارد.

 

موفق باشید

 

These functions are built around SOAP implementations of the Retrieve and RetrieveMultiple messages. I haven't annotated my code, so forgive any obvious lack of description of what the code is doing. I'll try to briefly summarize here:
MischiefMayhemSOAP
Parameters:
xmlSoapBody - (string) XML containing the body of the SOAP call
soapActionHeader - (string) The 'SOAPAction' specifying the type of SOAP call
Purpose:
Serves as a generic XMLHTTP interface to CRM's SOAP functions.
Returns:
(string) XML result from the CRM server.
RetrieveRecord
Parameters:
entityName - (string) The CRM-platform name of the desired entity
entityId - (string) The GUID of the record to retrieve
attrArray - (string[]) An Array of attributes to retrieve for the record
Purpose:
Easily retrieves a single record from CRM.
Returns:
(string[] or null) An Array of values from CRM, index-matching the attributes provided in attrArray. Returns null if there is an error with, or invalid return from, the SOAP call.
RetrieveMultiple
Parameters:
entityName - (string) The CRM-platform name of the desired entity
attrArray - (string[]) An Array of attributes to retrieve for the records
distinct - (string:"true" or "false") Directs CRM to return with or without duplicate records
criteriaXml - (string) XML containing any combination of Criteria or LinkEntities elements pertaining to the "RetrieveMultiple" SOAP message
Purpose:
Easily retrieves multiple records from CRM which match the rules defined in the criteriaXml.
Returns:
(string[n][] or null) An Array, with n matching-record elements, of an array of values from CRM, index-matching the attributes provided in attrArray. Returns null if there is an error with, or invalid return from, the SOAP call.

function ret_mobile()
{

function MischiefMayhemSOAP(xmlSoapBody, soapActionHeader) {
var xmlReq = ""
+ " + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"
+ " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"
+ Xrm.Page.context.getAuthenticationHeader()
+ " "
+ xmlSoapBody
+ " "
+ "";

var httpObj = new ActiveXObject("Msxml2.XMLHTTP");

httpObj.open('POST', '/mscrmservices/2007/crmservice.asmx', false);

httpObj.setRequestHeader('SOAPAction', soapActionHeader);
httpObj.setRequestHeader('Content-Type', 'text/xml; charset=utf-8');
httpObj.setRequestHeader('Content-Length', xmlReq.length);

httpObj.send(xmlReq);

var resultXml = httpObj.responseXML;

var errorCount = resultXml.selectNodes('//error').length;
if (errorCount != 0) {
var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
alert("The following error was encountered: " + msg);
return null;
} else {
return resultXml;
}
}

function RetrieveRecord(entityName, entityId, attrArray) {
var xmlSoapBody = ""
+ " "
+ " " + entityName + ""
+ " " + entityId + ""
+ " "
+ " ";

for (index in attrArray) {
xmlSoapBody += " " + attrArray[index] + "";
}

xmlSoapBody += ""
+ " "
+ " "
+ " ";

var resultXml = MischiefMayhemSOAP(xmlSoapBody, 'http://schemas.microsoft.com/crm/2007/WebServices/Retrieve');

if (resultXml != null) {
var resultArray = new Array();

for (index in attrArray) {
if (resultXml.selectSingleNode("//q1:" + attrArray[index]) != null) {
resultArray[index] = resultXml.selectSingleNode("//q1:" + attrArray[index]).nodeTypedValue;
} else {
resultArray[index] = null;
}
}

return resultArray;
} else {
return null;
}
}

function RetrieveMultiple(entityName, attrArray, distinct, criteriaXml) {
var xmlSoapBody = ""
+ " "
+ " "
+ " " + entityName + ""
+ " "
+ " ";

for (index in attrArray) {
xmlSoapBody += " " + attrArray[index] + "";
}

xmlSoapBody += ""
+ " "
+ " "
+ " " + distinct + ""
+ criteriaXml
+ " "
+ " ";

var resultXml = MischiefMayhemSOAP(xmlSoapBody, 'http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple');

if (resultXml != null) {
var resultArray = new Array();
var entityNodes = resultXml.selectNodes("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");

if (entityNodes.length > 0) {
for (var index = 0; index < entityNodes.length; index++) {
var entityNode = entityNodes[index];
resultArray[index] = new Array();

for (attrIndex in attrArray) {
if (entityNode.selectSingleNode("q1:" + attrArray[attrIndex]) != null) {
resultArray[index][attrIndex] = entityNode.selectSingleNode("q1:" + attrArray[attrIndex]).nodeTypedValue;
} else {
resultArray[index][attrIndex] = null;
}
}
}

return resultArray;
} else {
return null;
}
} else {
return null;
}
}

 

var mobile="";
mobile=RetrieveRecord('contact', Xrm.Page.getAttribute("new_contact").getValue()[0].id, new Array("mobilephone"));
Xrm.Page.getAttribute("new_mobile").setValue(String(mobile));
}

 

آمار Google Analytics  از بازدید  یک ماهه منتهی به 2015/9/15 !!!  

Country / Territory Sessions
Iran 6679
United States 499
United Kingdom 157
(not set) 100
Germany 77
Netherlands 49
Canada 43
France 34
United Arab Emirates 33
Australia 23
India 21
Brazil 17
Indonesia 16
Turkey 16
Pakistan 12
Ukraine 12
Iraq 10
Afghanistan 8
Italy 8
Russia 6
Spain 5
Japan 5
China 4
Luxembourg 4
Mexico 4
Philippines 4
Poland 4
Thailand 4
Bangladesh 3
Hungary 3
Malaysia 3
New Zealand 3
Oman 3
Portugal 3
Sweden 3
Singapore 3
Taiwan 3
Vietnam 3
Belarus 2
Egypt 2
Finland 2
Ireland 2
South Korea 2
Lebanon 2
Latvia 2
Romania 2
Saudi Arabia 2
Tajikistan 2
South Africa 2
Austria 1
Azerbaijan 1
Bermuda 1
Brunei 1
Congo (DRC) 1
Denmark 1
Algeria 1
Ecuador 1
Greece 1
Hong Kong 1
Israel 1
Kenya 1
Sri Lanka 1
Morocco 1
Norway 1
Turkmenistan 1
Uganda 1
 Total : 66 Countries 7923

 

Microsoft Dynamics CRM 2011/2013 JavaScript Reference

تو این پست میخوام یک ریفرنس و مرجع کامل درباره کلیه توابع مورد استفاده در JavaScript در Microsoft Dynamics CRM 2011/2013 ارائه کنم. ضمنا کلیه عملیات از مبتدی تا حرفه ای که معمولا مورد نیاز هستند را همراه با مثال توضیح میدم.

چون بر اساس نتایج Google Analytics مطالب این وبلاگ در ماه اخیر نزدیک به 8000 بار از 66 کشور search و بازدید شده (آمار Google Analytics از بازدید یک ماهه منتهی به 2015/9/15 !!!) تصمیم گرفتم  این مطلب را به زبان انگلیسی منتشر کنم .

 

Here’s a quick reference guide covering Microsoft CRM syntax for common jscript requirements

Most of the examples are provided as functions that you can easily test in the OnLoad/OnChange event of the Account form to see a working example

1. Get the GUID value of a lookup field:
Note: this example reads and pops the GUID of the primary contact on the Account form
function AlertGUID() {
var primaryContactGUID = Xrm.Page.data.entity.attributes.get("primarycontactid").getValue()[0].id;
alert(primaryContactGUID);
}
2. Get the Text value of a lookup field:
Note: this example reads and pops the name of the primary contact on the Account form
function AlertText() {
var primaryContactName = Xrm.Page.data.entity.attributes.get("primarycontactid").getValue()[0].name;
alert(primaryContactName);
}
3. Get the value of a text field:
Note: this example reads and pops the value of the Main Phone (telephone1) field on the Account form
function AlertTextField() {
var MainPhone = Xrm.Page.data.entity.attributes.get("telephone1").getValue();
alert(MainPhone);
}
4. Get the database value of an Option Set field:
Note: this example reads and pops the value of the Address Type (address1_addresstypecode) field on the Account form
function AlertOptionSetDatabaseValue() {
var AddressTypeDBValue = Xrm.Page.data.entity.attributes.get("address1_addresstypecode").getValue();
if (AddressTypeDBValue != null) {
alert(AddressTypeDBValue);
}
}
5. Get the text value of an Option Set field:
Note: this example reads and pops the value of the Address Type (address1_addresstypecode) field on the Account form
function AlertOptionSetDisplayValue() {
var AddressTypeDisplayValue = Xrm.Page.data.entity.attributes.get("address1_addresstypecode").getText();
if (AddressTypeDisplayValue != null) {
alert(AddressTypeDisplayValue);
}
}
6. Get the database value of a Bit field:
// example GetBitValue("telephone1");
function GetBitValue(fieldname) {
return Xrm.Page.data.entity.attributes.get(fieldname).getValue();
}
7. Get the value of a Date field:
returns a value like: Wed Nov 30 17:04:06 UTC+0800 2011
and reflects the users time zone set under personal options
// example GetDate("createdon");
function GetDate(fieldname) {
return Xrm.Page.data.entity.attributes.get(fieldname).getValue();
}
8. Get the day, month and year parts from a Date field:
// This function takes the fieldname of a date field as input and returns a DD-MM-YYYY value
// Note: the day, month and year variables are numbers
function FormatDate(fieldname) {
var d = Xrm.Page.data.entity.attributes.get(fieldname).getValue();
if (d != null) {
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++; // getMonth() considers Jan month 0, need to add 1
var curr_year = d.getFullYear();
return curr_date + "-" + curr_month + "-" + curr_year;
}
else return null;
}

// An example where the above function is called
alert(FormatDate("new_date2"));
9. Set the value of a string field:
Note: this example sets the Account Name field on the Account Form to “ABC”
function SetStringField() {
var Name = Xrm.Page.data.entity.attributes.get("name");
Name.setValue("ABC");
}
10. Set the value of an Option Set (pick list) field:
Note: this example sets the Address Type field on the Account Form to “Bill To”, which corresponds to a database value of “1”
function SetOptionSetField() {
var AddressType = Xrm.Page.data.entity.attributes.get("address1_addresstypecode");
AddressType.setValue(1);
}
11. Set a Date field / Default a Date field to Today:
//set date field to now (works on date and date time fields)
Xrm.Page.data.entity.attributes.get("new_date1").setValue(new Date());
12. Set a Date field to 7 days from now:
function SetDateField() {
var today = new Date();
var futureDate = new Date(today.setDate(today.getDate() + 7));
Xrm.Page.data.entity.attributes.get("new_date2").setValue(futureDate);
Xrm.Page.data.entity.attributes.get("new_date2").setSubmitMode("always"); // Save the Disabled Field
}
13. Set the Time portion of a Date Field:
// This is a function you can call to set the time portion of a date field
function SetTime(attributeName, hour, minute) {
var attribute = Xrm.Page.getAttribute(attributeName);
if (attribute.getValue() == null) {
attribute.setValue(new Date());
}
attribute.setValue(attribute.getValue().setHours(hour, minute, 0));
}

// Here's an example where I use the function to default the time to 8:30am
SetTime('new_date2', 8, 30);
14. Set the value of a Lookup field:
Note: here I am providing a reusable function…
// Set the value of a lookup field
function SetLookupValue(fieldName, id, name, entityType) {
if (fieldName != null) {
var lookupValue = new Array();
lookupValue[0] = new Object();
lookupValue[0].id = id;
lookupValue[0].name = name;
lookupValue[0].entityType = entityType;
Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
}
}
Here’s an example of how to call the function (I retrieve the details of one lookup field and then call the above function to populate another lookup field):
var ExistingCase = Xrm.Page.data.entity.attributes.get("new_existingcase");
if (ExistingCase.getValue() != null) {
var ExistingCaseGUID = ExistingCase.getValue()[0].id;
var ExistingCaseName = ExistingCase.getValue()[0].name;
SetLookupValue("regardingobjectid", ExistingCaseGUID, ExistingCaseName, "incident");
}
15. Split a Full Name into First Name and Last Name fields:
function PopulateNameFields() {
var ContactName = Xrm.Page.data.entity.attributes.get("customerid").getValue()[0].name;
var mySplitResult = ContactName.split(" ");
var fName = mySplitResult[0];
var lName = mySplitResult[1];
Xrm.Page.data.entity.attributes.get("firstname").setValue(fName);
Xrm.Page.data.entity.attributes.get("lastname").setValue(lName);
}
16. Set the Requirement Level of a Field:
Note: this example sets the requirement level of the Address Type field on the Account form to Required.
Note: setRequiredLevel(“none”) would make the field optional again.
function SetRequirementLevel() {
var AddressType = Xrm.Page.data.entity.attributes.get("address1_addresstypecode");
AddressType.setRequiredLevel("required");
}
17. Disable a field:
function SetEnabledState() {
var AddressType = Xrm.Page.ui.controls.get("address1_addresstypecode");
AddressType.setDisabled(true);
}
18. Force Submit the Save of a Disabled Field:
// Save the Disabled Field
Xrm.Page.data.entity.attributes.get("new_date1").setSubmitMode("always");
19. Show/Hide a field:
function hideName() {
var name = Xrm.Page.ui.controls.get("name");
name.setVisible(false);
}
20. Show/Hide a field based on a Bit field
function DisableExistingCustomerLookup() {
var ExistingCustomerBit = Xrm.Page.data.entity.attributes.get("new_existingcustomer").getValue();
if (ExistingCustomerBit == false) {
Xrm.Page.ui.controls.get("customerid").setVisible(false);
}
else {
Xrm.Page.ui.controls.get("customerid").setVisible(true);
}
}
21. Show/Hide a nav item:
Note: you need to refer to the nav id of the link, use F12 developer tools in IE to determine this
function hideContacts() {
var objNavItem = Xrm.Page.ui.navigation.items.get("navContacts");
objNavItem.setVisible(false);
}
22. Show/Hide a Section:
Note: Here I provide a function you can use. Below the function is a sample.
function HideShowSection(tabName, sectionName, visible) {
try {
Xrm.Page.ui.tabs.get(tabName).sections.get(sectionName).setVisible(visible);
}
catch (err) { }
}

HideShowSection("general", "address", false); // "false" = invisible
23. Show/Hide a Tab:
Note: Here I provide a function you can use. Below the function is a sample.
function HideShowTab(tabName, visible) {
try {
Xrm.Page.ui.tabs.get(tabName).setVisible(visible);
}
catch (err) { }
}

HideShowTab("general", false); // "false" = invisible
24. Save the form:
function SaveAndClose() {
Xrm.Page.data.entity.save();
}
25. Save and close the form:
function SaveAndClose() {
Xrm.Page.data.entity.save("saveandclose");
}
26. Close the form:
Note: the user will be prompted for confirmation if unsaved changes exist
function Close() {
Xrm.Page.ui.close();
}
27. Determine which fields on the form are dirty:
var attributes = Xrm.Page.data.entity.attributes.get()
for (var i in attributes)
{
var attribute = attributes[i];
if (attribute.getIsDirty())
{
alert("attribute dirty: " + attribute.getName());
}
}
28. Determine the Form Type:
Note: Form type codes: Create (1), Update (2), Read Only (3), Disabled (4), Bulk Edit (6)
function AlertFormType() {
var FormType = Xrm.Page.ui.getFormType();
if (FormType != null) {
alert(FormType);
}
}
29. Get the GUID of the current record:
function AlertGUID() {
var GUIDvalue = Xrm.Page.data.entity.getId();
if (GUIDvalue != null) {
alert(GUIDvalue);
}
}
30. Get the GUID of the current user:
function AlertGUIDofCurrentUser() {
var UserGUID = Xrm.Page.context.getUserId();
if (UserGUID != null) {
alert(UserGUID);
}
}
31. Get the Security Roles of the current user:
(returns an array of GUIDs, note: my example reveals the first value in the array only)
function AlertRoles() {
alert(Xrm.Page.context.getUserRoles());
}
32. Determine the CRM server URL:
// Get the CRM URL
var serverUrl = Xrm.Page.context.getServerUrl();

// Cater for URL differences between on premise and online
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}
33. Refresh a Sub-Grid:
var targetgird = Xrm.Page.ui.controls.get("target_grid");
targetgird.refresh();
34. Change the default entity in the lookup window of a Customer or Regarding field:
Note: I am setting the customerid field’s lookup window to offer Contacts (entityid 2) by default (rather than Accounts). I have also hardcoded the GUID of the default view I wish displayed in the lookup window.
function ChangeLookup() {
document.getElementById("customerid").setAttribute("defaulttype", "2");
var ViewGUID= "A2D479C5-53E3-4C69-ADDD-802327E67A0D";
Xrm.Page.getControl("customerid").setDefaultView(ViewGUID);
}
35. Pop an existing CRM record (new approach):
function PopContact() {
//get PrimaryContact GUID
var primaryContactGUID = Xrm.Page.data.entity.attributes.get("primarycontactid").getValue()[0].id;
if (primaryContactGUID != null) {
//open Contact form
Xrm.Utility.openEntityForm("contact", primaryContactGUID)
}
}
36. Pop an existing CRM record (old approach):
Note: this example pops an existing Case record. The GUID of the record has already been established and is stored in the variable IncidentId.
//Set features for how the window will appear
var features = "location=no,menubar=no,status=no,toolbar=no";

// Get the CRM URL
var serverUrl = Xrm.Page.context.getServerUrl();

// Cater for URL differences between on premise and online
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}

window.open(serverUrl + "/main.aspx?etn=incident&pagetype=entityrecord&id=" + encodeURIComponent(IncidentId), "_blank", features, false);
37. Pop a blank CRM form (new approach):
function PopNewCase() {
Xrm.Utility.openEntityForm("incident")
}
38. Pop a new CRM record with default values (new approach):
function CreateIncident() {
//get Account GUID and Name
var AccountGUID = Xrm.Page.data.entity.getId();
var AccountName = Xrm.Page.data.entity.attributes.get("name").getValue();
//define default values for new Incident record
var parameters = {};
parameters["title"] = "New customer support request";
parameters["casetypecode"] = "3";
parameters["customerid"] = AccountGUID;
parameters["customeridname"] = AccountName;
parameters["customeridtype"] = "account";
//pop incident form with default values
Xrm.Utility.openEntityForm("incident", null, parameters);
}
39. Pop a new CRM record with default values (old approach):
Note: this example pops the Case form from the Phone Call form, defaulting the Case’s CustomerID based on the Phone Call’s SenderID and defaulting the Case Title to “New Case”
//Collect values from the existing CRM form that you want to default onto the new record
var CallerGUID = Xrm.Page.data.entity.attributes.get("from").getValue()[0].id;
var CallerName = Xrm.Page.data.entity.attributes.get("from").getValue()[0].name;

//Set the parameter values
var extraqs = "&title=New Case";
extraqs += "&customerid=" + CallerGUID;
extraqs += "&customeridname=" + CallerName;
extraqs += "&customeridtype=contact";

//Set features for how the window will appear
var features = "location=no,menubar=no,status=no,toolbar=no";

// Get the CRM URL
var serverUrl = Xrm.Page.context.getServerUrl();

// Cater for URL differences between on premise and online
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}

//Pop the window
window.open(serverUrl + "/main.aspx?etn=incident&pagetype=entityrecord&extraqs=" + encodeURIComponent(extraqs), "_blank", features, false);
40. Pop a Dialog from a ribbon button
Note: this example has the Dialog GUID and CRM Server URL hardcoded, which you should avoid. A simple function is included which centres the Dialog when launched.
function LaunchDialog(sLeadID) {
var DialogGUID = "128CEEDC-2763-4FA9-AB89-35BBB7D5517D";
var serverUrl = "https://avanademarchdemo.crm5.dynamics.com/";
serverUrl = serverUrl + "cs/dialog/rundialog.aspx?DialogId=" + "{" + DialogGUID + "}" + "&EntityName=lead&ObjectId=" + sLeadID;
PopupCenter(serverUrl, "mywindow", 400, 400);
window.location.reload(true);
}

function PopupCenter(pageURL, title, w, h) {
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
var targetWin = window.showModalDialog(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
41. Pop a URL from a ribbon button
Great info on the window parameters you can set here: http://javascript-array.com/scripts/window_open/
function LaunchSite() {
// read URL from CRM field
var SiteURL = Xrm.Page.data.entity.attributes.get("new_sharepointurl").getValue();
// execute function to launch the URL
LaunchFullScreen(SiteURL);
}

function LaunchFullScreen(url) {
// set the window parameters
params = 'width='+screen.width;
params += ', height='+screen.height;
params += ', top=0, left=0';
params += ', fullscreen=yes';
params += ', resizable=yes';
params += ', scrollbars=yes';
params += ', location=yes';

newwin=window.open(url,'windowname4', params);
if (window.focus) {
newwin.focus()
}
return false;
}
42. Pop the lookup window associated to a Lookup field:
window.document.getElementById('new_existingcase').click();
43. Pop a Web Resource (new approach):
function PopWebResource() {
Xrm.Utility.openWebResource("new_Hello");
}
44. Using a SWITCH statement
function GetFormType() {
var FormType = Xrm.Page.ui.getFormType();
if (FormType != null) {
switch (FormType) {
case 1:
return "create";
break;
case 2:
return "update";
break;
case 3:
return "readonly";
break;
case 4:
return "disabled";
break;
case 6:
return "bulkedit";
break;
default:
return null;
}
}
}
45. Pop an Ok/Cancel Dialog
function SetApproval() {
if (confirm("Are you sure?")) {
// Actions to perform when 'Ok' is selected:
var Approval = Xrm.Page.data.entity.attributes.get("new_phaseapproval");
Approval.setValue(1);
alert("Approval has been granted - click Ok to update CRM");
Xrm.Page.data.entity.save();
}
else {
// Actions to perform when 'Cancel' is selected:
alert("Action cancelled");
}
}

 

 

Here is a little more info that will help you get your head around the general design of all this…

Depending upon what you want to do you will interact with one of the following:

Xrm.Page.data.entity.attributes – The data fields represented by fields on the form

Xrm.Page.ui.controls – The user interface controls on the form

Xrm.Page.ui.navigation.items – The navigation items on the form

Xrm.Utility – A container of helpful functions