Posts

Showing posts from October, 2019

Working with Model/Extensions (Part 2) - D365

Image
Use objects of other models in our custom model and solve reference error. In this part we will solve the common issue usually faced at the beginner stage while development in D365.  Let's say we need to search for the attachment in a sales order. We will find it through job using x++ query. Create a job ( Runnable class ) We need to use DocuRef table in our query to search for the attachments of the sales order.  Now, when we build the project it will show the error shown below in the image. Following error " does not denote a class. . . " usually occurs when the model of the project does not refer to the model of the objects using in it.  DocuRef table belongs to the other model i.e. Application Foundation. Which is not included in our custom model AXGuru_Customizations. We need to update our model which we have previously discussed the steps in  Part 1 . For ease, I am showing steps here too. Go to...

Working with Model/Extensions (Part 1) - D365

Image
Create extension of the objects related to other models in our custom model in D365 When we create a new model in D365, the model refers to the only package ApplicationPlatform by default which means we can only create extensions of the objects related to the ApplicationPlatform model. System will not allow to work with the objects related to other models with our model AXGuru_Customizations. For example: We can create extension in our model to customize the objects of Application Platform model. But if we need to customize an object related to other models like Application suite,  the system does not allow us to create extension of the objects by disabling the option. This is because system will only allow to work with the packages referenced with our model AXGuru_Customizations. So, In this case we need to add Application suite reference to our model. Go to tab Dynamics365> Model Management > update model paramaters... Select the model ...

Upload file to Azure blob - D365

Image
Upload file to Azure blob  - D365 In this blog we will upload file to Azure blob using Dynamics 365. File path can be different according to the scenarios. In my case I have attached a file to a sales order. Following are the steps mentioned below. Step 1:   Add an attachment to the sales order.  File has been attached to the sales order. Step 2: Code to upload the attached file to the azure blob storage. Firstly, we need to have credentials of the azure storage. On the Azure portal we can find the credentials on the following navigation.  Home > Resource groups > select resource group > storage account > select storage account Under Settings  section, click on Access keys to get the credentials of storage account. Note:  We can upload file to azure blob using connection string or using key and storage account name. Code is same for both with some differences. Upload file ...

Positive pay file in D365

Image
Positive Pay File -  D365  Convert XSLT file to CSV format. Positive pay files are created using data entities. The input file format must be only of XML type. Therefore, we need to create an a file with the extension XSLT ( Extensible Style sheet Language Transformation ). Create an XSLT file. Note: We can use Notepad/Notepad++ and save it with extension .XSLT  Now, we need to do setup configurations to run positive pay file on bank. Step 1: Add positive pay formats. Go to Cash and bank management > Setup > Positive pay formats   Create/edit positive pay file format. Then click on Upload file used for transformation to upload XSLT file created above. Step 2: Assign file format to the bank. Go to  Cash and bank management > Bank accounts > Bank accounts. Select any bank. Go to  Manage Payments Tab > General > positive pay format. Select payment format. Now, before jumping to step ...