Posts

Showing posts from June, 2020

Connecting D365 with C# client.

Image
Hello Guys, We have come across many situation where we need to integrate D365 with third party. For example we have to create a website which is going to handle some entities  of the CRM or we need to create some EXE. or Window services which will update CRM records from the background. Sometimes we want to create a WEB Api which will integrate D365 CRM with another UI. There are so many scenarios where we need to connect CRM with other applications.  This blog will explain how you can connect D365 with any C# client whether it is Console, Windows or Web. To achieve this we need Visual Studio. you can use any version of the Visual Studio. So now we will implement it step by step. Step 1:- Start Visual Studio. Step 2:- Go to File->New -> Project -> Other Project -> Visual Studio Solutions. Specify the Name of the Project and click on OK. Step 3:- Now go to the solution explorer. Right click on "D365Connector" -> Add new project -> Select Class Library ->

Association of Lookup field while creating a new record in Canvas Application.

Image
Hello Guys, In my previous blog i have shown you how you can display lookup field value while displaying records in canvas application.Today i'm going to show you how you can associate lookup field while creating a new record. Consider a scenario where we are creating a new contacts and we want to specify its company name which is nothing but the Account Entity. If we are working with Model Driven Application then it is easy for us to associate lookup. But while using canvas app we are not able to select the lookup field like we do in Model Driven Application. To achieve this we need to create a separate list of lookup and we can associate it with the record which we are going to create. So we will implement it step by step. Step 1:- First we will create a new canvas application from the scratch. For time being i have created one canvas application i.e. Customer Directory as below. Step 2:- Rename the Screen1 as "LstAccount". From the menu click on Insert -> Gallery -&

How to display lookup field value while displaying records in Canvas Application.

Image
Hello Guys, This blog will explain you how you can display lookup field value while displaying records in Canvas Application. We know that there are some limitation of using canvas application. One of the scenario is when we display a list of records for any entity which is having any lookup field then if we try to display that lookup then we are not able to display its value instead it's GUID is displayed. For Example. Consider a scenario we need to display all the Contacts along with its Accounts using a List. Here Account is lookup field on Contact entity so we will be displaying its Name or Value. So first of all we will be creating a canvas application. Step 1:- Click on  https://make.powerapps.com/ . Step 2:- Click on Canvas app from blank. Step 3:- Specify App name. Select Format of the app which you want and click on Create. Step 4:- Rename the Screen1 as "LstContact".  From the Menu select Insert -> Gallery -> Vertical. Now we will bind this Gallery2 with c

How to implement PreSearch on Lookup field in D365.

Image
Hello Guys, This blog will explain how you can implement PreSearch on Lookup field based on some conditions. We all have faced some scenarios where we need to populate lookup field based on some filtration condition so that we can select desire value from those lookup values. Consider a scenario where we have Contacts which belongs to different region. We want to filter these Contacts based on their region on any other entities like opportunities. So first will create Region field on contact entity which is type of option set.Also the same field we will created on opportunity entity. So we have added Region field on both Contact and Opportunity Entity. Now we want when user select region, contacts should be filtered based on selected region.  To do so we have written Java Script code as below.   We will be calling this java script on the change event of Region. So now we have added this script in web resource in CRM.  Now create a new Opportunity and select Region field and you will se

How to create an appointment using code activity with multiple attendees in D365

Image
Hello guys, This blog will explain you how you can create an appointment using code activity with multiple attendees. Consider a scenario where you have two entity named Program and Trainee with below attributes. Here we have N:N relation between Program and Trainee which means many programs having multiple trainees. Now we want when we change the status of the program, an appointment should be sent to all the trainees who have enrolled for that program. So first of all we will be creating this two entities in D365. For a time being i have created this two entities as below. Program Entity: Trainee Entity: Here you can see we have checked Activities and Sending email option as this entity will be added in required attendees. If this options are not enabled you can't add them in appointment and also you will get error stating "Invalid Object Type". We are having below trainee list. Now we have created one Program named "Dynamics 365". we will be writing a code ac

Using FormContext as Global variable in D365

Image
Hello Guys, This blog will explain the use of Form Context or Execution Context as Global variable in D365. We know that Client Side Scripting using Java Script is one of the best way to handle business process logic whether it is a client side validation or displaying data on model driven app. For implementing this functionalities one of the main feature is Xrm.Page which is deprecated now and we have to use Execution Context instead of this. To use Execution Context we need to pass it as parameter in Java script function as shown in below image. Consider a scenario where we are having multiple functions which is using Execution Context on single entity. Now to implement this either we can pass execution context as first parameter in all function as shown above image or we call function by passing parameter in it. This approach is fine when we have less functions but what about where we are working on large functions used in a single entity. In this scenario we can use Form Contex