Step by step how to create Number sequence.

For this demo, I will create New module, about creating Number Sequence without module is also same steps just leave some steps base on Design picture above

  1. Create ETD ContosoId extends num datatype.

  2. Create Contoso Table with ContosoId field.

  3. Create a new enum value Contoso in base ENUM NumberSeqModule.

This value will be used to link number sequence to the module and to restrict displayed number sequence by module in Form.

We normally create action delete in foreign table to make sure referential integrity in Logic and validation.

The delete action has the following options: None, Restricted, Cascade, Cascade + Restricted


This has no effect, and effectively disables the delete action. This is useful if you want to specifically state do nothing so that someone else doesn’t try to correct what seems to be an omission.


This will prevent the record from being deleted if there are records in the related table that match the selected relation. This occurs within the validateDelete table event, which is called by the delete table event.


This will delete the record in the related table, based on the relation. Ex: A sales order line is of no use without a sales order. This is an extension of the delete table event.

Cascade + Restricted

This is a little special. In a two-table scenario, it is the same as Restricted. It will stop the record from being deleted if a related record exists. But if the record is being deleted as part of a cascade from a table related to it, the records will be deleted.

for more infomation about how to create DeleteActions at MSDN.

At the previous post I already show how to customize Response Value list in AIF Document standard service, today we will talk about response in Custom AIF service class.

We already know for Custom AIF service we actually need 2 classes, one is contract for data input and one is service to process a logic. With Response class, it’s literally same with contract class. They both hold parm value.

  • contract class gets parametters.

  • Response class sets return values.


I want to get HcmPersonnelNumberId and HcmWorkerName of current userID on C#.NET application.


  • Write Custom AIF service to get Worker information, and then public this service.

  • Write C#.NET console to consume that service.


Response class

class MaxWorkerResponse
    str     gId;
    str     gName;

two value that I want to return is HcmPersonnelNumberId and HcmWorkerName, I will store it in 2 parms method

public HcmWorkerName parmName(HcmWorkerName _name = gName)
    gName = _name;

    return gName;

public HcmPersonnelNumberId parmId(HcmPersonnelNumberId _id = gId)
    gId = _id;

    return gId;

Service class

Create MaxPRService Class, This class consume through service that need to be extend SysOperationServiceBase class

class MaxPRService extends SysOperationServiceBase

Main logic

AifCollectionTypeAttribute('return', Types::String)]
public MaxWorkerResponse getEmployee()
    HcmWorkerRecId          workerRecId;
    HcmPersonnelNumberId    personnelNumber;
    HcmWorkerName           name;
    MaxWorkerResponse       response;

    workerRecId = DirPersonUser::currentWorker();
    personnelNumber = HcmWorker::find(workerRecId).PersonnelNumber;
    name = HcmWorker::find(workerRecId).name();
    response = new MaxWorkerResponse();
    return response;

Create service

In AOT create new service and add recent created class to that Service, in operations node add getEmployee method, you will get something likes

Then right click service > Add-ins > Register Service.

go to AIF inbound form to create new service and add getEmployee operation to that service then Active.

Consume service

Add recent WSDL URI http://WINSERVER:8104/DynamicsAx/Services/MaxPurchReqGeneral into Service reference in C# Console project

static void Main(string[] args)
	CallContext context = new CallContext()
		Company = "USMF",
		Language = "EN-US",
	MaxPRServiceClient client = new MaxPRServiceClient();
	MaxWorkerResponse response = client.getEmployee(context);
	Console.WriteLine(response.HcmWorkerName + ", " + response.HcmPersonnelNumberId);

Thank you for reading.

We normally use NETTCP adapter for .NET system, It going to very easy to consume by.

As my experience, if we use NETTCP adapter for consuming by Java system, we will need add some extension or 3rd party due to binding and mismatch schema and of course client doesn’t want to do that either me.

So, my solution is creating HTTP adapter for Java, you can also use .NET system to consume HTTP adapter without any problems

How to do

  • You need to make sure install web services component on Internet Information Services (IIS) and verify that the default website is working.

  • In AX, under System administrator > Services and AIF > Web sites, open from a create new record follow information

Name: DynamicsAXAif60 Virtual directory share path: \\YourServerName\MicrosoftDynamicsAXAif60 URL: http://YourServerName/MicrosoftDynamicsAXAif60

  • From now on, you can create AIF inbound port with HTTP adapter.

After you’ve actived the services, that Port will deployed under DynamicsAXAif60 folder in IIS.

Thank you for reading.