Skip to main content

Posts

Azure Blockchain to CDS

In this blog we will see how to create a Blockchain network in Azure and send the smart contract data to CDS. If you need to know more about Blockchains, the below references are useful. Blockhain A-Z . MSDN Channel-9 . Microsoft tech Community . Build Quorum application with Azure Blockchain Service . Blockchain research Institute . Microsoft Blog . Microsoft Azure Workbench . Prerequisites Make sure you have enough Azure credits to start with. When deploying Blockchain Workbench, lot of components will be deployed.  Need AD admin consent for approving API connection/Need an admin account.  Deploy the Workbench in East-US region as some features are available only in this region. Deploy your Azure Workbench by following the guide here . Quorum blockchain in Azure is a private blockchain unlike other popular blockchains such as Bitcoin. Bitcoin uses Proof of work(POW) to reach consensus on transactions while Quorum makes use of Istanbul Byzantine f...

Query 'OR' range for Date in Dynamics AX

The query build range for 'OR' conditions in Dynamics AX  tests your patience and skills 😄 One of the reasons is that it's tough to know what went wrong. Some the rules has been listed out here . I followed the such an approach for building query. The functionality was to filter records based which falls in today's range. Let's say today's date is 27/11/2019. So here I have to fetch all the records where StartDate >= today() AND EndDate<=today(). Simple right? But the twist is that if EndDate is null() I have to consider it as limitless range. Meaning I have to consider records where (EndDate<=today() || EndDate = DateNull()) too in my range. The code below filters the records equal/below today's date. qbds.addRange(fieldNum(Table, StartDate)).value(strFmt('<%1', systemDateGet()+1)); For some reason, the code below did not consider when the EndDate was null. Query extended range failure: Syntax error near 4...

Barcode for query report

Query reports have restrictions in their design compared to RDP reports. We generally use query reports for simpler design and does not include complex data manipulation. One such complex scenario is displaying barcode for the item in the report. But reporting in AX has enough flexibility so that we can display the barcode using a query report. We'll see below how to do that. Step1 :  Write a display method. Write a display method which returns the barcode string. Update the reportDS by selecting the display method. Step2: Refer this field in the report design. Step3: To make the font name dynamic, add references of the setup tables in your AOT query. Here barcodeSetupId in my parameter form has a reference from barcodeSetup table. Font name from barcodeSetup has been fetched. Step4 : Create a report parameter and refer the fontName. The fontName is coming from barcodeSetup table. The parameter visibility is hidden as we don't...

Custom service testing using Postman

In this post we will see how to test a custom service class through Postman. I created a simple service class which returns "Hello world". Hence i don't need the contract class in this case. I created a new Service 'TestSOAPService' which refers the class of the same name. A service operation which refers the method 'HelloWorld' is created. Then i created a new service group TestSOAPServiceGroup. This group has the service TestSOAPService. The AutoDeploy property is set to 'Yes'. After the build, this Custom service is available through two service endpoint. The OData endpoint is : https://[].dynamics.com/api/services/TestSOAPServiceGroup/TestSOAPService/HelloWorld The SOAP endpoint is : https://[].dynamics.com/SOAP/services/TestSOAPServiceGroup/TestSOAPService/HelloWorld?wsdl Here we will test the OData service endpoint using Postman. Fill the Postman parameters as shown below. The OAuth token generated from the previous ...

D365 Postman access token creation

To test an OData service of D365 through Postman we need to generate an access token. Go through the Microsoft blog for a quick overview on how to generate an access token  here . The endpoint for getting the access token should be in the format  https://login.microsoftonline.com/ [tenant ID] /oauth2/token The method type is 'POST'. The following parameters are given in the body of the request. In the 'Tests' tab of the request use the following code below. I have declared a global variable 'bearerToken' and assign the access token to it. This variable can be used in other service requests. This step is not mandatory but it is useful when when we want to test multiple OData services. After sending the request, the access token is received in the body of the response.

D365 SOAP UI token creation

To test SOAP services of D365 we need to generate a OAuth token which is to be sent along with the request. We will use SOAP UI application to test our service. Before reading the post, go through the M icrosoft blog on creating a OAuth token through SOAP UI application here . The blog is outdated as SOA P UI has a new user interface and features but it is still useful. Create a new project > new test suite > new test case > Create new Http request. The endpoint is your tenant_id in the format  https://login.microsoftonline.com/[tenant ID]/oauth2/token. The method type is 'POST'. Fill the parameters with the values shown below. Click 'Ok'. Now check the 'Post QueryString' check box and run the service. The service returns an access token which can used for further processes.

Zipping the file in AX 2009

In various scenarios, it is required to zip the file to reduce its size or to encrypt it altogether so that specific people have access to it. Hence it becomes an integral part in this era to share information safely. The dll Ionic.Zip  for zipping the file is does not exist in AX 2009 by default. Firstly we need to download the dll and place it in the bin(both server and client folders) of dynamics AX. The bin folder is present in Microsoft dynamics AX > 50 > Application > Client > Bin. After this, add a reference of that dll in References node of AOT.  Now create a method to zip the file.