Pages

Sunday 4 August 2019

JavaScript Changes from CRM2016 to Dynamics 365


Create one function to assign execution context to a variable called  '_globalExecutionContext' .

CRM2016
Xrm.Page.context.getUserLcid()
Xrm.Page.ui.controls.get()
Xrm.Page.getControl()
Xrm.Page.data.entity.save()
Xrm.Page.ui.getFormType()
Xrm.Page.data.entity.attributes.forEach
Xrm.Page.getAttribute()
Xrm.Page.data.entity.getId()
Xrm.Page.context.getUserName()
Xrm.Page.context.getUserRoles()
Xrm.Page.context.getUserId()
Xrm.Page.data.entity.attributes.get()
Xrm.Page.data.entity.save()
Xrm.Navigation.openForm()
Xrm.Page.data.entity.getEntityName()
Xrm.Page.ui.tabs.get(args)
Dynamice 365
Xrm.Utility.getGlobalContext().userSettings.languageId
_globalExecutionContext.getFormContext().ui.controls.get()
_globalExecutionContext.getFormContext().getControl
_globalExecutionContext.getFormContext().data.entity.save()
_globalExecutionContext.getFormContext().ui.getFormType()
_globalExecutionContext.getFormContext().data.entity.attributes.forEach
_globalExecutionContext.getFormContext().getAttribute
_globalExecutionContext.getFormContext().data.entity.getId()
Xrm.Utility.getGlobalContext().userSettings.userName
Xrm.Utility.getGlobalContext().userSettings.securityRoles
Xrm.Utility.getGlobalContext().userSettings.userId
_globalExecutionContext.getFormContext().data.entity.attributes
_globalExecutionContext.getFormContext().data.entity.save()
Xrm.Utility.openEntityForm()
_globalExecutionContext.getFormContext().data.entity.getEntityName()
_globalExecutionContext.getFormContext().ui.tabs.get(arg)

Thursday 25 July 2019

CRM2016 Java script obsolete and Dynamics 365 version 9 replacement java script


XRM object is globally available.

CRM2016
Xrm.Page
verison 9
ExecutionContext.getFormContext

CRM2016
Xrm.Page.context.getUserId
verison 9
Xrm.Utility.getGlobalContext().userSettings.userId

 CRM2016
Xrm.Page.context
verison 9
Xrm.Utility.getGlobalContext

 CRM2016
Xrm.Page.context.getUserId
verison 9
Xrm.Utility.getGlobalContext().userSettings.userId

 CRM2016
openEntityForm
verison 9
Xrm.Navigation.openForm'

 CRM2016
Xrm.Page.context.getUserLcid

verison 9
Xrm.Utility.getGlobalContext().userSetings.languageId

Monday 1 July 2019

Client API Xrm object - Components of Xrm Object

The Xrm object is globally available to use in your code without having to use the execution context in Client API.

Below are the components of Xrm object

Xrm.DeviceProvides methods to use native device capabilities of mobile devices.
Xrm.EncodingProvides methods to encode strings
.Xrm.NavigationProvides methods for navigating forms and items in model-driven apps
.Xrm.PanelProvides a method to display a web page in the side pane of model-driven apps form.
Xrm.UtilityProvides a container for useful methods.
Xrm.WebApiProvides methods to use Web API to create and manage records and execute Web API actions and functions.
Xrm.WebApi.offline: Provides methods to create and manage records in the model-driven apps mobile clients while working in the offline mode.
Xrm.WebApi.online: Provides methods to use Web API to create and manage records and execute Web API actions and functions when connected to the server.

Dynamics 365 Root objects in the Client API object model


At the root of the Client API object model are the following contexts and the Xrm object:
ObjectDescription
executionContextRepresents the execution context for an event in model-driven apps forms and grids.
More information: Client API execution context
formContextProvides a reference to a form or an item on the form against which the current code executes. To get the formContext object, use the executionContext.getFormContext method.
More information: Client API form context
gridContextProvides a reference to a grid or a subgrid on a form against which the current code executes.
More information: Client API grid context
XrmProvides a global object for performing operations that do not directly impact the data and UI in forms, grids, subgrids, controls, or attributes. For example, navigate forms, create and manage records using Web API.
More information: Client API Xrm object

Deprecated methods in v9.0 (xrm.utility)

Syntax Difference Between CRM2016 and Version 9 (FormContext)

In CRM2016 , the global Xrm.Page object was used to represent a form or an item on the form. With the latest version, the Xrm.Page object is deprecated, and you should use the getFormContext method of the passed in execution context object to return reference to the appropriate form or an item on the form.


CRM2016
function displayName()
{
var firstName = Xrm.Page.getAttribute("new_field1").getValue();
var lastName = Xrm.Page.getAttribute("new_field2").getValue();
console.log(firstName + " " + lastName);

}


Latest Version CRM
function displayName(executionContext)
{
var formContext = executionContext.getFormContext(); // get formContext

// use formContext instead of Xrm.Page
var firstName = formContext.getAttribute("new_field").getValue(); 
var lastName = formContext.getAttribute("new_field").getValue();
console.log(firstName + " " + lastName);

}

Tuesday 6 November 2018

Microsoft Dynamics 365 for Finance and Operations on-premises Prerequisites

You can deploy Microsoft Dynamics 365 for Finance and Operations (on-premises). When you choose an on-premises deployment type, the system requirements, hardware sizing, and functionality differ from a cloud deployment .

Software Requirements.
1.Microsoft Windows Server 2016 Datacenter or Standard - Operating System
2. Only 64-bit versions of SQL Server 2016 are supported