AIF – Wrong field ID in the key data container in entity key

@SYS92355 = “Wrong field ID in the key data container in entity key”

This error message from the AIF in AX4sp2 did give me some headache today..

Finally I solved it. I was about to export a SalesOrder with both header and lines, but I did put my sendElectronically method in the SalesLine table, *not* in SalesTable table.. So when executed I never got the correct keys. The query I used for the axd wizard was based on SalesTable first, and THEN SalesLine..

Might help someone else with the same or similar problem!

Last 5 posts in Development

3 thoughts on “AIF – Wrong field ID in the key data container in entity key

  1. In AIF the following error is observed “Wrong field ID in the key data container in entity key” if the selected record is not found in the master table in order to send the data electronically.

    A simple example would be as follows:

    static void VendorOutbound(Args _args)

    AxdVendTable axdVendTable;
    AifEntityKey entityKey = new AifEntityKey();
    AifPropertyBag aifPropertyBag;
    VendTable vendTable;
    XmlDocument xmlDocument = new XmlDocument();

    select firstonly vendTable where vendTable.VendId == ‘0000083_SO’;
    //Entity Key is a unique identifier. If the above select statement do not fetch any record from table then the discussed error would be thrown.
    axdVendTable = AxdBase::newClassId(classnum(AxdVendTable));
    xmlDocument.loadXml(, null, new AifEndpointActionPolicyInfo(), new AifConstraintList(), aifPropertyBag));‘c:\\VendTable_Out.xml’);

    Would like to have your thoughts on the same

  2. That assumes that you have a clue on what’s wrong, which I didn’t … 🙂

    I do alot of these projects. This time I had misplaced the send method. If the error message had been a bit more clear, I would have solved it a lot sooner.


  3. I received this same error when I didn’t have an index set up on my table. The index happened to be the value I was sending in for my read, but I don’t know if that’s mandatory or not.

Leave a Reply

Your email address will not be published. Required fields are marked *