Using Postman with D365

We need the right tool for the job. Postman is a tool that often used to interact with Restful services (OData). Below is how you can setup postman to work with D365 (assuming you know how to setup on Azure side like tenant_id, client_id, client_secret)

SETUP

Setting up BearerToken

Params tab

Body tab

grant_type: {{grant_type}}

client_id: {{client_id}}

client_secret: {{client_secret}}

resource: {{resource}}

Test tab

var json = JSON.parse(responseBody);

tests[“Get Azure AD Token”] = !json.error && responseBody !== ” && responseBody !== ‘{}’ && json.access_token !== ”;

postman.setEnvironmentVariable(“bearerToken”, json.access_token);

TEST

OR

Postman with CRUD operations

Insert
Operation

Header tab

Authorization =
Bearer {{bearerToken}}

If-None-Match = null

OData-Version = 4.0

Content-Type = applicatin/json

Accept = application/json

Odata-MaxVersion = 4.0

Body tab

Result

AX7 – A quick way to find form patterns

In AX, there are 5 form patterns that we use the most :

  • Details Master
  • Form Part – Fact Boxes
  • Simple List
  • Table of Contents
  • Operational workspaces

Sometimes, we want to follow some other patterns but we don’t know where to find. It is time consuming to look for form by form. Here is the quickest way

Step 1: We’re going to look at how to run the form patterns report. This report is generated through Visual Studio and gives us information about all of the forms in the system with the corresponding form patterns

clip_image001

This will generate a CSV file that we can open in Excel

clip_image002

clip_image003

Step 2: Open the excel and we’ll notice in Excel, we have columns that tell us which model the form is in, the system name for the form, as well as the form style and the form pattern

clip_image005

In addition, it gives us information about the controls and the percent of coverage.  So we’re free to now sort and filter and organize this list so we can determine which system form has which pattern applied, and also which forms do not have any pattern applied.  So if I want to sort on this particular pattern column, we can go ahead and apply sort.

Below are all form patterns in AX7

clip_image006

AX7– Some tips to set up Visual Studio for a better expereince

There are a few settings we want to configure in Microsoft Visual Studio that will make the development experience with AX a little smoother

Go to AX 7 Options

image

Set Projects Options.

image

Set Text Editor Options.

clip_image004

Set Best Practice Options.

clip_image006

Set IntelliTrace

image

A CLR error occurred while invoking the scheduling engine

I came across this issue recently

image

The issue in this was caused by the AOS Server configuration option “Enable the hot-swapping of assemblies for each development session” being enabled on the server.

In our development environment, we enable the hot-swap feature of the Application Object Server (AOS) to use updated assembly DLL files without having to repeatedly stop and restart the AOS. Restarting the AOS terminates the connections from other developer clients, which can be an inconvenience.

This option should NOT be activated on production environments. Disabling the option resolved the issue

image