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)

Integration of Salesforce to AX

(0) ShareShare
ReportReport
Posted on by 587

Hi All,

I am new to AX and need some help for integrating salesforce and ax. My requirement is to generate the sales order in salesforce and then send the data to ax on realtime basis. Also i need to send data back from AX to salesforce.

So can you help me with the solution?

*This post is locked for comments

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

    You can create sales orders in AX using AIF document services.

    The solution for "sending data back from AX to salesforce" depends on what and how you want to send.

  • SamiraM Profile Picture
    587 on at

    Hi Martin,

    As soon as sales order is created in AX using document service, I want to send the sales order Id of ax, sales order items back to salesforce. If the status of order item is updated in AX then it should be updated in salesforce. In salesforce there is a web service for this purpose but how and when I can call this web service from Ax.

    Regards,

    Samira

  • Suggested answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    The document service returns IDs of created orders.

    Regarding status update, one possible design is logging the event to a separate table and send the events to SalesForce by a batch, after the status change was committed to database. Regarding how to call web services, please consult Consume Web Services on MSDN.

  • SamiraM Profile Picture
    587 on at

    I am new to AX but I was thinking can we write some custom code when update is done on sales order items.

  • SamiraM Profile Picture
    587 on at

    Hi Martin,

    Below is my requirements.  For point 3 Can you let me how i can send back the sales order and sales order items back to salesforce? Is it that i need to write any custom code and which dev environment i can use to write this?

    1.      Need to be able to click on  a “Create Sales Order” custom button on the SFDC Opportunity Page Layout and submit the “Create Sales Order” request from Salesforce to AX via the Sales Order Interface.

    2.      Depending on the requirements of creating a new Sales Order record in AX, the Sales Order Interface should pass the required data elements (e.g. AX Account ID (from Salesforce Account), AX Pricebook Entry ID (from Salesforce Pricebook Entry), Product Qty, Sales Price, etc) from Salesforce to AX.

    3.      After a new Sales Order record is created in AX, the Sales Order and the related Sales Order Items should be sent back to Salesforce immediately. SFDC can pull the records from AX or AX can push the records to SFDC.

    4.      The Sales Order/Order Item records in SFDC should be read-only to the end users, any updates in AX (e.g. Sales Order status/amount change or add/remove order items) should be populated back into SFDC.

    Regards,

    Samira

  • Suggested answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    When you call the "create" operation of the AIF document service, it will return an array of entity keys of the orders created in AX.

    I'm not sure what you mean by "Sales Order Items". You know what line details (inc. items) you sent to AX, so you don't have to get it back. But if there is something generated by AX that you don't have, simply call the "read" operation of the same document service to fetch the details.

  • SamiraM Profile Picture
    587 on at

    Hi Martin,

    By salesorder item I mean the line item that will be added in order. Suppose the amount or status is changed for any line item then immediately I need to update Salesforce for this. Read operation will be based on batch. So do I need to write any custom workflow for this purpose?

  • SamiraM Profile Picture
    587 on at

    Also how can I log the event in database as per your earlier comment?

  • Verified answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    "Also how can I log the event in database as per your earlier comment?" Just create a record in database.

    Maybe you actually don't understand why, so let me briefly explain it. In theory, you could change SalesTable.update() method to call a SalesForce web service. But that would have to bug problems:

    1. Web service calls are slow and therefore updates would become performance problem and longer transactions in database would cause additional issues.
    2. The transaction could be rolled back after sending notification to SalesForce, so you would end up with inconsistent data.

    That's why you shouldn't call the web service from the same transaction. Merely save the information to a table and send it later.

    It's not related to workflow, unless you actual have some workflow-related requirements.

  • SamiraM Profile Picture
    587 on at

    Thanks for all the help. One more query for updating the SalesOrder.Update method can I do the C# coding or I have to do X++.  We are having AX 2009 on premise version. Also do you have some sample code of how to update salesorder.update method or the link where I can get step by step information.

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