Posts

Showing posts from November, 2023

SSRS report using contract class

Image
SSRS report Custom SSRS report development: Requirement:  Create following report design using "Customer number" as parameter.                           Used object: 1. Temp table (if required) 2. Contract class (if required) 3. DP class 4. Controller class 5. Report design 6. Action menu item Temp table:  If report based on custom table, create new temp table(preferably used as inMemory type) otherwise create extension of standard table and add the required extendable field.  Contract class:  Create contract class if report contains any parameter to run the report. In the following example taken customer number as report parameter [DataContractAttribute] public class XXX_CustomerAgingContract {     AccountNum accountNum;     [DataMemberAttribute("Customer number")]     public AccountNum parmCustomerNum(accountNum _accountNum = accountNum)   ...

Custom services - API request and response using X++

Image
Creating custom services: Requirement :  D365 FO Received request from external application, read the request within D365 FO and response back to external application from D365 FO. Request body: {   "_request": {     "SalesId": ["TestSO001", "TestSO002"]   } } Response body: {   "OrderDetails": [     {       "order_number": "TestSO001",       "ShipmentTrack": ["Track-01"]        },     {       "order_number": "TestSO001",       "ShipmentTrack": ["Track-02", "Track-03"]       }   ] } To achieve above request and response JSON, we need to create few contract classes and to communicate external application, we need to create service and service group objects.  AppId and secrets key needs to setup under D365 FO AAD. Request Contract class: [datacontractattribute] public class XYZ_ShipmentRequest {        DataAreaI...