Json Service Call in Dynamics Ax 2012.

Recently I got chance to call restful Json based service in Dynamics Ax 2012.

I used a C# class library and then add to AOT.  AX 2012

Json based service successfully called both client side and server side. Only tricky part was to make Json string or payload.

I used to make Json string something similar. Both works in C# as well as X++



payload += “{\”ApproversEmpCode\”:\””+ employeeCode +”\”,”;

payload += “\”message\”:\””+table.Message +” “+ strReplace(Message,”\'”,”`”)+”\”,”;

payload +=  “\”requestType\”:\”” +tableId2Name(TableId) +”\”,”;

payload += “\”transactionId\”:\””+int642str(RecId)+”\”}”;



Happy Daxing.


Ali Raza Zaidi, Microsoft ERP Consultant, Currently working for Business Experts Gulf in United Arab Emirates. Specialized in HR & Payroll, Supply Chain and Financials modules.