Posts

Showing posts from January, 2022

How to Create a Custom Service in D365fo (Using Data Contract)

Image
Create custom service in D365fo: Create the Request Class. Create the Response Class. Create the Service Class. Create the Service Object. Create the Service Group. Request Class [DataContractAttribute] class TBS_VendRequest {     private DataAreaId dataAreaId;     private VendAccount accountNum;     [DataMember("DataAreaId")]     public DataAreaId parmDataAreaId(DataAreaId _dataAreaId = dataAreaId)     {         if (!prmIsDefault(_dataAreaId))         {             dataAreaId = _dataAreaId;         }         return dataAreaId;     }     [DataMember("AccountNum")]     public VendAccount parmAccountNum(VendAccount _accountNum = accountNum)     {         if (!prmIsDefault(_accountNum))         {             accountNum = _accountNum;         }         return accountNum;     } } Response Class [DataContractAttribute] class TBS_VendResponse {     private boolean     result;     private str         error;     private DataAreaId dataAreaId;     private VendAccount accoun

Setup Postman To Call D365fo API

Image
Prerequisites Install Postman on the local development VM. Go to https://portal.azure.com Select " Azure Active Directory " Write the " Tenant ID" . We will use it later with name "Directory ID" Select "App registrations"  then click "+ New registration"  and fill data as following and press Register: Write the "Application (client) ID". We will use in later with name "Client ID" Select "Certificates & secrets" then click the "+ New client secret". Fill Description and Expires then click "Add" . Write the " Value ". We will use it later with name "Client secret ID" Login to D365fo then go to System administration then Setup then Azure Active Directory applications . Click New then fill the "Client ID" with the "Application Client (ID)" then fill "Name"  then fill "User ID" , for testing select user with system administ