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)

Create Customers in AX using XML

(0) ShareShare
ReportReport
Posted on by 2,626

Hello ALL,

I have just started to study AX. I need to create Customer record in AX using XML. My all record are in XML.i need to integrate all records from XML to AX. What should be the solution for this?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at

    Hi Vikas,

    You can use the Application Integration Framework (AIF) or Data Import/Export Framework.(DIXF).

    If you are not using AX2012 CU7 then DIXF is not able to read xml files.

    You can also write a custom xml handler to read the file.

    For more information first have a look at several technet pages:

    AIF: technet.microsoft.com/.../gg731810.aspx

    DIXF: technet.microsoft.com/.../jj225591.aspx

  • Vikas Gupta Profile Picture
    2,626 on at

    Hello  ANDRE,

    Thanks for your reply,

    if my data is in tables instead of XML then what will be the solution.

  • André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at

    Hi Vikas,

    If it is not XML, then it depends on the file type. You mentioned 'tables'. Where can we find these tables? Is it an SQL Server database?

  • Vikas Gupta Profile Picture
    2,626 on at

    Hi  ANDRE,

    Yes, our tables are in SQL SERVER 2008 R2.

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    official MS tell you to use AIF

    look at my online demo

    www.youtube.com/watch

  • Vikas Gupta Profile Picture
    2,626 on at

    Thanks to All for your valuable and helpful Comments,

    I need one more help. I have done some code for integrate the customer using C#. But the problem is that it is creating the record in ONE(Thats is USMF test company) company only if i need to integrate that record in any other company what to do with code.

    Here is my C# Code.

    AxdCustomer Cust = new AxdCustomer();

               CustomerServiceClient CstService = new CustomerServiceClient();

               AxdEntity_CustTable tabCust = new AxdEntity_CustTable();

               CustomerServiceClient proxy = new CustomerServiceClient();

               AxdCustomer AxCustTableObject = new AxdCustomer();

               AxdEntity_CustTable[] AxCustTableData = new AxdEntity_CustTable[1];

               CallContext AxDocumentContext = new CallContext();

               EntityKey[] AxEntityKey;

               AxDocumentContext.MessageId = Guid.NewGuid().ToString();

               AxCustTableData[0] = new AxdEntity_CustTable();

               AxCustTableData[0].AccountNum = "256714";  //mandatory for AXClass

               AxCustTableData[0].CustGroup = "10";  //mandatory for AXClass

               AxCustTableData[0].Currency = "eur";        //mandatory for AXClass

               AxCustTableObject.CustTable = AxCustTableData;

               try

               {

                   AxEntityKey = proxy.create(AxDocumentContext, AxCustTableObject);

               }

               catch (Exception c)

               {

                   richTextBox1.Text = c.ToString();

               }

  • Verified answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    yes but this code will always point to the user default company

    CustomerServiceClient client = new CustomerServiceClient ();

    CustomerServiceClient .CallContext context = new CallContext();

    context.Company = "trd";

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans