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)

Sales Order creation via AIF Inbound Ports

(0) ShareShare
ReportReport
Posted on by 75

EDI Sales Orders are being generated via SalesOrder inbound AIF port.

Would someone be so kind as to help point me in the right direction as to what needs modified in the AIF Inbound Ports form and\or what class needs modified to pull data from custom fields added to CustTable and populate the same custom fields that have been added to SalesTable.

I have been able to modify the code behind the SalesCreateOrder form to move data from these custom fields between CustTable and SalesTable when a sales order is manually created directly in AX. 

VantagePoint from DataMasons is being used for EDI. It only uses data from either the EDI file provided by the customer or data stored in the VantagePoint database. 

The data I would like to get populated to SalesTable doesn't exist in the VantagePoint database or EDI file. 

I don't really want to build out this existing data on custom fields in CustTable to the VantagePoint database. 

Surely though if I have enough data via the VP database and EDI file to create a SO in AX including AccountNum, I would think I should be able to also pull data directly from custom fields on CustTable based on the AccountNum and populate the same fields on SalesTable during SO creation via AIF

Thanks in advance

David

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ajit Profile Picture
    8,755 on at

    As I understand your question, you are looking new columns must be populated from customer table when SO gets created from AIF, Right?

    Add your code in 'initFromCustTable' method of salesTable.

  • David Vanechaute Profile Picture
    75 on at

    Thanks for the reply.

    Yes, I am looking to populate from CustTable to SalesTable.

    And adding code to initFromCustTable does work when creating a SO in AX via the SalesCreateOrder form but it doesn't seem to be working when creating the order via the AIF Inbound Ports.

    So I was under the assumption I needed to also change something in the AIF Inbound Ports setup or some AIF classes.

    You don't think this is the case?

    Thanks

    David

  • Suggested answer
    Ajit Profile Picture
    8,755 on at

    It should work for AIF as well.. Generate incremental CIL and try.

  • David Vanechaute Profile Picture
    75 on at

    Thanks much. I will make sure and generate incremental CIL and try again. Will let you know.

  • Suggested answer
    Ajit Profile Picture
    8,755 on at

     I don't think so I mean I know that particular class is used for sales orders if we are creating from AIF but that particular requirement should be achieved by that table changes only.

  • David Vanechaute Profile Picture
    75 on at

    I much appreciate both of your replies. I will try later this evening or weekend and let you know.

    Thanks much

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Hi David Vanechaute,

    Ax* classes use a different logic to initialize fields. For each field you have 2 methods there : parm* and set*. Parm* is called when XML message has a tag for this field (with empty value or not) and set* is called if there is not tag in XML.

    So what you can do it is add new fields to AxdSalesOrder query, add new parm and set methods to AxSalesOrder class and put initializing code to set methods. AxSalesOrder  class is full of examples how to do it or you can wind in the web lots of how to articles.

    I would not recommend you to use wizard from article provided by Sukrut Parab, because it will add all new fields to AxSalesOrder   and it could be hard to understand what has happened if you don't have any experience with AIF.

  • Ajit Profile Picture
    8,755 on at

    I believe these new columns are not required in data policies as it won't be there on EDI schema. And those columns won't be available in incoming schema. He is looking to just populate values from customer. Do we  still need those parm and set methods?

  • Mea_ Profile Picture
    60,284 on at

    Standard AX way to default values in AIF is set* methods, you may go with it or build your own bicycle, its always up to you.  

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