Notifications
Announcements
No record found.
Hi Community,
I am considering creating a Readonly OData service which points directly to the AX database.
Do you see any potential issues with this approach?
Appreciate your insights..
*This post is locked for comments
Are you aware that readonly OData services are supported in Dynamics AX 2012 out of the box? Is there any reason why you can't use them?
Thanks Martin,
Yes, I am aware, and tried them, but they are 1. extremely limited in functionality (I mean none of the query parameters works), 2. Very Slow ,3. Need flexibility to add some Auditing & external user authorization logic.
If you have a problem with standard services, please explain it - somebody may be able top help you. Nevertheless I admit that performance may be a problem.
To answer your original question: accessing AX database directly is definitely not recommended and this applies to read-only access, although it's surely much less dangerous than writing. Nevertheless you would bypass all security, wouldn't be able to use any AX business logic (foreign key expansion, display methods etc.), would have to deal with table inheritance and generally depend on implementation details. That's the reason why you should always go through AOS.
That being said, there are cases when direct reading from DB may be appropriate, but I wouldn't use it for anything complex, because you would likely end up reimplementing a lot of AX logic (including things mentioned above and existing queries).
Nevertheless you haven't yet tried all options before giving up - namely, consider implementing your OData service with calling the AX query service rather than constructing SQL queries.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2