Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What's new for developers in Dynamics 365 v9: Client API enhancement

945 views

Published on

Client API

Published in: Technology
  • ➤➤ 3 Reasons Why You Shouldn't take Pills for ED (important) ➤➤ http://ishbv.com/rockhardx/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

What's new for developers in Dynamics 365 v9: Client API enhancement

  1. 1. Method Description getDepth Returns a value that indicates the order in which this handler is executed. getEventArgs Returns an object with methods to manage the OnSave event. getEventSource Returns a reference to the object that the event occurred on. getFormContext Returns a reference to the form or an item on the form depending on where the method was called. getSharedVariable Retrieves a variable set using the setSharedVariable method. setSharedVariable Sets the value of a variable to be used by a handler after the current handler completes.
  2. 2. function displayName() { var firstName = Xrm.Page.getAttribute("firstname").getValue(); var lastName = Xrm.Page.getAttribute("lastname").getValue(); console.log(firstName + " " + lastName); } old function displayName(executionContext) { var formContext = executionContext.getFormContext(); // get formContext // use formContext instead of Xrm.Page var firstName = formContext.getAttribute("firstname").getValue(); var lastName = formContext.getAttribute("lastname").getValue(); console.log(firstName + " " + lastName); } new
  3. 3. collection.forEach(delegate function(attribute, index))
  4. 4. var gridContext = formContext.getControl("Contacts"); You can register for the OnChange, OnRecordSelect, and OnSave events using the Events tab of the Dynamics 365 Customer Engagement page that is used to enable editable grids for an entity or a read-only grid. function myFunction(executionContext) { | var formContext = executionContext.getFormContext(); // get the form context var gridContext = formContext.getControl("Contacts");// get the grid context var myContactsGridOnloadFunction = function () { console.log("Contacts Subgrid OnLoad event occurred") }; gridContext.addOnLoad(myContactsGridOnloadFunction); }
  5. 5. Namespace Description Xrm.Device Provides methods to use native device capabilities of mobile devices. Xrm.Encoding Provides methods to encode strings. Xrm.Navigation Provides methods for navigating forms and items in Customer Engagement. Xrm.Panel Provides a method to display a web page in the side pane of Customer Engagement form. Xrm.Utility Provides a container for useful methods. Xrm.WebApi Provides methods to use Web API to create and manage records and execute Web API actions and functions.
  6. 6. equivalent deprecated
  7. 7. Property Description client Returns information about the client. organizationSettings Returns information about the current organization settings. userSettings Returns information about the current user settings.
  8. 8. Method Description getAdvancedConfigSetting Returns information about the advanced configuration settings for the organization. getClientUrl Returns the base URL that was used to access the application. getCurrentAppName Returns the name of the current business app in Customer Engagement. getCurrentAppProperties Returns the properties of the current business app in Customer Engagement. getCurrentAppUrl Returns the URL of the current business app in Customer Engagement. getVersion Returns the version number of the Dynamics 365 Customer Engagement instance. isOnPremises Returns a boolean value indicating if the Customer Engagement instance is hosted on-premises or online. prependOrgName Prefixes the current organization's unique name to a string, typically a URL path.
  9. 9. New Namespace Description Xrm.Device Provides methods to use native device capabilities of mobile devices. Xrm.Encoding Provides methods to encode strings. Xrm.Navigation Provides navigation-related methods. Xrm.WebApi Provides properties and methods to use Web API to create and manage records and execute Web API actions and functions.
  10. 10. Namespace New APIs formContext.data - OnLoad event and even handlers (addOnLoad and removeOnLoad) - isValid - Updated saveOptions in the formContext.data.save method to include a new value called saveMode to let the onSave event handlers know why the save is happening - attributes collection formContext.data.entity getEntityReference isValid formContext.data.entity attribute isValid setPrecision formContext.ui event handlers for the OnLoad event (addOnLoad and removeOnLoad)
  11. 11. Namespace New APIs Xrm.Utility getAllowedStatusTransitions getEntityMetadata getGlobalContext getLearningPathAttributeName getResourceString invokeProcessAction lookupObjects showProgressIndicator closeProgressIndicator refreshParentGrid
  12. 12. https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer- engagement/important-changes-coming#some-client-apis-are-deprecated
  13. 13. Important changes coming in Dynamics 365 Customer Engagement Client scripting in Customer Engagement using JavaScript Client API Reference for Customer Engagement
  14. 14. https://www.npmjs.com/package/@types/xrm XrmExecutionContext => executionContext: Xrm.Events.EventContext executionContext: Xrm.Events.SaveEventContext

×