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)

AIF SalesSalesOrderService - New field not populating on Sales Order.

(0) ShareShare
ReportReport
Posted on by 355

Summary: I've created a new field in the SalesTable and want to add it to the Sales Order Service. I've followed the steps to make it come through, show up in the field selection and the schema. When I populate the XML with data for the field, it comes through as blank.

Steps I've taken:

1.  Create the field 'LOCID' in SalesTable, synchronize and compile the table

2.  Went to the AxdSalesOrder AOT query and clicked 'Restore'. This brought the new field into the Query.
3.  Under Tools -> AIF -> Update Document service, I have updated the service with the 'regenerate data object classes' and 'update AxBC classes' cheboxes checked. This created my methods in the SalesSalesOrder_SalesTable and AxSalesTable classes:

class SalesSalesOrder_SalesTable extends AfStronglyTypedDataContainer
{
    #define.LocId('LocId')
    ...
}

public str parmLocId(str _locId = '')
{
    if (!prmisdefault(_locId))
    {
        this.setField(fieldNum(SalesTable, LocId), _locId);
    }

    return salesTable.LocId;
}


public boolean existsLocId()
{
    return this.exists(#LocId);
}


public str parmLocId(str _value = '')
{
    if (!prmisdefault(_value))
    {
        this.set_Attribute(#LocId, _value);
    }

    return this.get_Attribute(#LocId);
}


4.  Generated incremental CIL

5.  Refreshed SalesSalesOrderService  in the AIF Services form. No errors were generated. 


6. Enabled my field here (Making it required / not required does not seem to make a difference)
2018_2D00_06_2D00_01-15_5F00_01_5F00_07_2D00_10.4.11.102-_2D00_-Remote-Desktop-Connection.png

7. The input file looks like so, alphabetical:

2018_2D00_06_2D00_01-15_5F00_08_5F00_04_2D00_C_5F005F00_Users_5F00_Aazarchankau_5F00_Desktop_5F00_LANE_5F00_6_2D00_1_2D00_2018_5F00_vpEDI_5F00_aifSalesOrder_5F00_20180531_5F00_120827_5F00_.png


The transaction is created, but the custom field is empty. I've tried this with other custom fields and I get the same results.

What is strange if I leave the field as required and take it out of the import XML file, the file still comes through. No Exceptions in the Exception log.

Can anyone help point me in the right direction on how I can proceed to debug this? Is there any way to intercept the process and see if/how the value is being passed in as blank to the table?

Any help would be greatly appreciated, I can provide further detail if needed.

*This post is locked for comments

I have the same question (0)
  • Catalyst619 Profile Picture
    355 on at

    Also tried restarting AOS and clearing the .AUC files. Sadly the problem still persists

  • Verified answer
    Soren Andersen Profile Picture
    530 on at

    Hi 

    I expect, that you only have one AOS  - so it is not something about AOS not being updated.

    I guess it is an inbound port you are using?! If so - do you have a data-policy for that port - make sure that the field is here as well  - and is enabled.  You have activated it somewhere I can see - but it could be for the service in general. So check datapolicy - it is not updated automatically.

    The same if XML validation is de-activated for the port - you will not get errors - no matter if the field is there or not.

    Last - but not least - check the field properties for the new field - salestable.locid - is "Allow edit on create" = true? It must for AIF

    Regards

    Søren

  • Verified answer
    Catalyst619 Profile Picture
    355 on at

    Update: 

    There was an inbound transform customized by another developer that uses another XSD, the newly added fields were not present there. Thank you for your assistance.

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