web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Consuming 3rd Party RESTful APIs

(0) ShareShare
ReportReport
Posted on by

Hi, I'm looking at integrating with some 3rd parties, they provide a RESTful API, but I'm not sure where the actual code to GET/POST data should sit in terms of extendability and best practice. Is it better to wrap the API in a C# DLL and call this from X++, or just use X++ code, are there any particular pit falls for either solution?

Thanks

*This post is locked for comments

I have the same question (1)
  • Vilmos Kintera Profile Picture
    46,149 on at

    It has already been discussed earlier:

    https://community.dynamics.com/ax/f/33/t/154480

    There are already examples for implementing RESTful API calls in AX 2012, it is easy to find if you use a search engine. For example this one:

    dynamics.folio3.com/.../consuming-rest-apis-dynamics-ax-2012

  • Community Member Profile Picture
    on at

    Yes, I saw those, but my question asks about best practice.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    There is no design best practice for this. AX supports calling .Net framework namespace contents natively. In a C# wrapper you might use advanced techniques though which are not accessible from AX such as better error handling, event subscriptions and  a lot more. If you would utilize those and have a strong .Net developer team, I would go down that route and just save back the VS project to the AOT with having the DLLs as a Project output, so AX AOS would deploy it automatically for you when starting the service.

    If you would not utilize such techniques, it is perfectly fine to do it in X++.

    We have implemented an AES/Rijndael encryption for example using the .Net CryptoAPI in X++ and worked perfectly fine with great performance. It was easier for us to handle it this way, since it was only a single class object stored as an XPO within TFS, compared to having 10-15 files in a VS project.

    It is up to your personal preference to be honest. The only consideration is whether you are doing any DB operations or not, in which case I would lean more towards X++ again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans