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)

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,788 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,788 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,788 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,286 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,788 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,286 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

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
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans