Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to create service for reading customer data from external team

Posted on by

Hi All,

We have a requirement to give the customer/vendor details to external team.

How we can create a service to provide them , so they can access Customer/Vendor details from AX2009.

Please advise us.

Regards,

Akbar

  • Ferhat.S Profile Picture
    Ferhat.S 231 on at
    RE: How to create service for reading customer data from external team

    Yes it is. But as Martin said its realy bad idea if you aren't know what are you doing. For exaple you can conflict records or ignore other validations. Also you can miss relational updates for other tables.  But only reading record via sql i think it is fine.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: How to create service for reading customer data from external team

    Accessing the DB directly for reading may be technically possible, but it's a bad idea. Don't do it. It's dangerous, it would be more work and it doesn't cover your requirements anyway (e.g. you wouldn't be able to create new records, such as customers).

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to create service for reading customer data from external team

    Thank you Martin and Ferhat for your inputs.

    For bi-directional integration it looksit will take more time to decide and design the code.

    Is it possible that the external team can access the Database(SQL server) and read and update the Master records?

    Please advise.

  • Ferhat.S Profile Picture
    Ferhat.S 231 on at
    RE: How to create service for reading customer data from external team

    Hey Martin thanks for advice on posting code. It is my first answer here. I dont know much more thing about it. I will learn.

    And for my answer i just want to give him a way to he can practice and maybe he could find best solution. As you say need more information for proper answer.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: How to create service for reading customer data from external team

    Using the Business Connector is one of possible ways, but you can't say that it's the solution for Akbarpasha requirements if the requirments aren't known yet. You can't simply ignore all the questions about direction of communication (BC can't cover requests sent from F&O), reliability (BC calls will fails if AOS can't be reached for any resson) and so on, and say that BC is always the answer.

    Another example: it's very likely that installing Business Connector and calling it directly from the other system won't be possible. Therefore BC couldn't be used directly - you'd need to design a web service that woukd be called by the other system and which would iternally use BC. Then you must consider whether using web services directly isn't easier, especially when you can use a tested solution supported by Microsoft instead of custom development.

    By the way, please always use Insert > Code to paste source code. Isn't this much easier to read and work with?

    Axapta localax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta();
    localax.Logon(string company, string language, string objectServer, string configuration);
    string answer = localax.CallStaticClassMethod("ClassName","MethodName","param1","param2",....).ToString();

  • Ferhat.S Profile Picture
    Ferhat.S 231 on at
    RE: How to create service for reading customer data from external team

    Hey Akbar,

    I can share actively used methods.

    You will need Microsoft.Dynamics.BusinessConnectorNet to login axapta2009 and simply call method from axapta classes.

    Web Api Codes:

    Axapta localax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta();
    
    localax.Logon(string company, string language, string objectServer, string configuration);
    
    string answer = localax.CallStaticClassMethod("ClassName","MethodName","param1","param2",....).ToString(); // this methods has return value.
     

    You can pass an information through to axapta or can get information from axapta.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: How to create service for reading customer data from external team - AX2009

    I'm afraid you'll need to collect much more information about the requirement before you can even start designing a solution. Your current description says almost nothing.

    For example, if "bi-directional" means that AX will also need to call an API of the other system, then you originally forget this half of requirements.

    If updates can happen in both systems, you need to decide how to deal with conflicting updates. You'll need to decide how the systems will assign IDs. If there is no direct visibility between those two systems, you'll need to desing a kind of proxy. Then what should happen if a change occurs but the other system is not reachable (network issue, system down for maintenance etc.)? Then you need to track which changes needs to be sent later, e.g. by using a message queue. You must also take into account things like performance and security.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to create service for reading customer data from external team - AX2009

    Thank you Martin for the information.

    Requirement is that, third party needs bi-directional integration with AX 2009 application for Reading/updating the Master data for Vendors and Customers.  

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: How to create service for reading customer data from external team - AX2009

    An application programming interface (API) is an extremely wide term - it can mean alsmost anything. If you have no more detailed requirementsm then AIF meets that, because it does offer several means. For example, you can call it over SOAP web service, use BizTalk adapter or utilize a message queue. You could also utilize Business Connector.

    If you have more detailed requirements and you're unable to decide what to do with them, please share them with us.

    Unfortunately you're working with a very old version of AX and you won't find too many materials abouit it anymore.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to create service for reading customer data from external team - AX2009

    Thank you Martin for the information,

    External team wants to use API for pulling the data from AX2009, how we can implement this.

    Please send us if you have any link where we can see the example for this using API.

    Regards,

    Akbar

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans