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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Create New AIF

(0) ShareShare
ReportReport
Posted on by

Hi all

at first, i am new to using AIF and what I want to do is to make service that achieves when someone made Purchase Order in Company A in another Environment  it make a new Sales Order in Company B in Main Environment  with the same lines 

after Some Search, I know how to create document service but I stopped at this point

Can Experts advise me on this, or from where I need to start?

Regards.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,395 Most Valuable Professional on at

    It's not clear what document services (for which document) you're you trying to create and problem you have with it. Please give us more information.

  • Walid Gamal Profile Picture
    on at

    Hi Martin,

    all that I need is how to begin in AIF to do what I said on the main question

    Regards.

  • Martin Dráb Profile Picture
    239,395 Most Valuable Professional on at

    As with anything else, you should first think about business requirements and restrictions and then make a high-level design meeting these requirements. Talking about implementation makes little sense if you don't have a high-level strategy first.

    For example, maybe your source environment can call the sales order document service (which is already included in AX) of the target environment and you don't have to create any new service at all.

    Or maybe you can't access the other environment directly, or you want to export data from the source environment even if the target environment is down, so you can't use a direct call.

    Or maybe you want (for some reason) to execute the process by some middle-tier services and not from the source environment. In that case, you would need a way how to extract the data, e.g. using the query service or document services.

  • Walid Gamal Profile Picture
    on at

    Hi Martin 

    I created now Document Service that contains Sales table and Sales line in a query that outer join

    and fetch-mode is 1: N but when I try to test this Service in a job but it gives me the following Error

    8867.Service-Error.png

    Can you tell me how can I solve this issue?

    Regard.

  • Martin Dráb Profile Picture
    239,395 Most Valuable Professional on at

    Why are you creating a new document service for sales orders if there already is one built by Microsoft? Isn't it a waste of time?

    If you insist on developing and debugging your another document service for sales orders, the first step should be clicking the "Edit" button to see where the error is coming from. But I wouldn't bother...

  • Walid Gamal Profile Picture
    on at

    Hi Martin

    Sorry for that Error it happened because of the info log

    and the line add to sales table but now I need to add lines in Sales line

    There is no method Create Salesline like SalesOrder.createSalesTable_1();

    Can you help me in this?

    Regards,

  • Martin Dráb Profile Picture
    239,395 Most Valuable Professional on at

    I'm sorry, but I don't understand what you're talking about. I don't see any reason why you want to create another document service instead of using the standard one, I don't know your code, I have no idea what you by that "the error happened because of the info log"...

    You would have to give us a better explanation. Start with explaining why you want to build another document service for sales orders - if you can use the standard one, stop wasting time with developing a new one and use the one developed by Microsoft and successfully used on many projects.

  • Walid Gamal Profile Picture
    on at

    Hi Martin,

    I am new in Creating Services and this one there is a service that creates sales order but what if the second there is no service for it So I need to learn how to create service and how to use it about the error when I debug on the job the error has done in the last line where the info happen

    Now Can you help me in that issue or give me some threads for Services?

  • Martin Dráb Profile Picture
    239,395 Most Valuable Professional on at

    I thought you wanted to know how to achieve your requirement to create sales orders in one AX environment when purchase orders are created in another. If you're now saying that it's not the topic of this thread at all, you asked a wrong question.

    You still haven't told us what exactly you did, what you see if you click the Edit button (you should also use the debugger to identify bugs in your code) etc., so I really can't do anything unless you explain it properly.

    Documentation is here: Technet: AIF Document Services [AX 2012].

  • Walid Gamal Profile Picture
    on at

    Hi Martin

    I really appreciate your help and advise after some search I found that what you say Is right and I can use the service of sales order to create sales order can you help me again in how to use it to create a sales order?

    Regards.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans