Azure · C# Code · Dynamics 365 WEB API · Dynamics Plugins

{Dynamics 365 CRM WEB API C#} Get Azure AD Access Token without ADAL library

Recently we had a requirement to call graph API and CRM web API from custom code. Microsoft has provided us with the ADAL library to get the token from Azure AD. In today’s blog I will share code to get Azure AD access token without ADAL library. The benefit of getting Azure AD access token…… Continue reading {Dynamics 365 CRM WEB API C#} Get Azure AD Access Token without ADAL library

Dynamics 365 WEB API · Dynamics CRM Javascript · Javascript

{Dynamics 365 Web API} Setting Multiselect optionset values

Multiselect optionset field is a great feature introduced by microsoft. With the Web API, you set the values by passing a string containing comma separated number values as shown in the following example: POST [organization uri]/api/data/v9.0/contacts HTTP/1.1 Accept: application/json Content-Type: application/json; charset=utf-8 OData-MaxVersion: 4.0 OData-Version: 4.0 { “@odata.type”: “Microsoft.Dynamics.CRM.contact”, “firstname”: “Wayne”, “lastname”: “Yarborough”, “new_testmultiselect”: “1,…… Continue reading {Dynamics 365 Web API} Setting Multiselect optionset values

D365 Error · Dynamics 365 WEB API · Dynamics CRM Javascript · Javascript

Dynamics CRM 365 WEB API Common Errors and Resolution

While working with Dynamics CRM web api we may get different exceptions. I have compiled list of common error and their resolution based on my experience working on recent projects Error – An error occurred while validating input parameters: Microsoft.OData.ODataException: Does not support untyped value in non-open type. POST – https://CRMORG.api.crm.dynamics.com/api/data/v9.1/leads { “firstname”: “Jenny”, “lastname”:…… Continue reading Dynamics CRM 365 WEB API Common Errors and Resolution

Dynamics 365 WEB API · Dynamics CRM Javascript · Javascript

Dynamics CRM 365 Get current Date Time based on logged in User Timezone through Javascript

Dynamics CRM new Date() from javascript will return DateTime based on user system time but not based on logged in user timezone selected in personal settings. In order to get get current Date Time based on logged in User Timezone through Javascript, we can use below code which will return Date time based on logged…… Continue reading Dynamics CRM 365 Get current Date Time based on logged in User Timezone through Javascript

Dynamics 365 WEB API · Javascript

{Dynamics 365 Web API} Follow and Unfollow CRM Core records

Dynamics 365 platform provides feature to Follow and Unfollow records from CRM  record form ribbon button and views ribbon button. Whenever we follow any record in CRM, System creates new record in PostFollow entity and record in PostFollow entity will be deleted when we Unfollow the record. Today I will walkthrough the approach to achieve…… Continue reading {Dynamics 365 Web API} Follow and Unfollow CRM Core records

Dynamics 365 WEB API · Dynamics CRM Javascript · Javascript

{Dynamics 365 Web API} Create Notes with Attachment

Today I will explain how to create Notes with Attachment in CRM using Web Api. In order to create Attachment we need to convert the content to Base64String and pass the content as string in request body to CRM. Code to create Notes with Attachment using Javascript Xmlhttprequest var entity = {}; entity.subject = “ABCDDDDDDDDDDDDd”;…… Continue reading {Dynamics 365 Web API} Create Notes with Attachment