Chapter 3. Client-side Logic with Microsoft Dynamics CRM 2015

In this chapter, we will learn about implementing client-side logic in Microsoft Dynamics CRM 2015. We are going to learn about various client-side extensions in Microsoft Dynamics CRM 2015. We will start by creating JavaScript Web resources and will learn about consuming CRM web services using client-side code. We will also discuss business rules in Microsoft Dynamics CRM 2015 with their new enhancements and we will keep working on our training solution that we created in the previous chapter.

In this chapter we will be discussing the following topics:

  • Understanding the client scripting object model
  • Understanding web resources
  • Accessing forms and controls using client-side code
  • Understanding client-side events
  • Using CRM web services in client-side code
  • Understanding Business Rules

Understanding the client scripting object model

In the client scripting object model, we utilize client-side programming to write code that runs on browsers. We can embed our client-side code in different places in Microsoft Dynamics CRM 2015. We can write client-side code to interact with entity forms and their controls. To work with client scripting object models, there are events exposed for forms and controls that we will be discussing in later topics.

Using client scripting object model, we can customize the behavior of command buttons; for example, let's say that we want to enable a command button for specific security role users or we may want to show a button when a specific value is entered in a text box. These types of requirement can be implemented by writing custom JavaScript actions for command buttons with enable and display rules.

Note

We can refer to https://msdn.microsoft.com/en-us/library/gg309639.aspx to get details about enabling and displaying rules.

We can also write our client-side code or create a client-side library using web resources. We will be discussing web resources in later topic. Once web resources are saved and published, we can attach a reference to them in entity forms and command bar buttons by modifying RibbonDiffXML, and in other web resources. Client-side object models can also be used to create HTML web resources to develop custom web pages.

Note

The RibbonDiffXML file is an XML file that is used to customize command button definitions. Refer to https://msdn.microsoft.com/en-us/library/gg328409.aspx for more details on RibbonDiffXML.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.200.14