Posts

Showing posts from April, 2024

Set up Client Secret Connection to Dynamics

Image
  Steps in Microsoft Azure: ·           Navigate to portal.azure.com and login. ·           Navigate to Azure Active Directory > App Registrations > New Registration     Register your Application. a.        Enter an  Application name. b.        Select which account types you wish to access this API. c.         Click  Register.   Copy the Application (client) ID and note it for later use.     Create a new Client Secret for the Application.   Select Certificates & secrets > New Client Secret   Enter a description, select an expiry duration and click Add. Click on Certificates and Secrets and click on New Client secret Copy the client secret and note it for later use. Make sure to copy the Value field, as below. Then below window will opened Here give the description name and click on Add. After adding the client secret Note down the value Grant Microsoft Dynamics permissions. a.        Select  API Permissions  >  Add a Permission  >  Dynamics CRM b.        Select the c

Secure and Unsecure Configurations By using Json

Image
 User story: Whenever you are updating the last name in the contact entity then Job Title and Email and Business Phone will be update. In the visual studio first, we need to install  Newtonsoft.Json  from  Manage NuGet Packages. Code: using  Microsoft.Xrm.Sdk; using  Newtonsoft.Json; using  System; using  System.Collections.Generic; using  System.Linq; using  System.Text; using  System.Text.Json.Serialization; using  System.Threading.Tasks;   namespace  Shared_Variables {      public   class   abc      {          public   string  phonenum;          public   string  jobTitle;          public   string  email;      }         public   class   jsonsecure  : IPlugin      {          public   readonly   string  _unsecure;          public   readonly   string  _secure;          public   jsonsecure ( string  unsecurevalue,  string  securevalue)          {              _unsecure = unsecurevalue;              _secure = securevalue;          }            public   void  Execute(IServiceProvider serv