<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: AIF - Wrong field ID in the key data container in entity key</title>
	<link>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/</link>
	<description>Dynamics AX development blog</description>
	<pubDate>Tue, 07 Sep 2010 01:04:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Amber</title>
		<link>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-13383</link>
		<dc:creator>Amber</dc:creator>
		<pubDate>Wed, 18 Aug 2010 14:13:22 +0000</pubDate>
		<guid>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-13383</guid>
		<description>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.</description>
		<content:encoded><![CDATA[<p>I received this same error when I didn&#8217;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&#8217;t know if that&#8217;s mandatory or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik Laurell</title>
		<link>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-1968</link>
		<dc:creator>Henrik Laurell</dc:creator>
		<pubDate>Mon, 13 Oct 2008 06:44:23 +0000</pubDate>
		<guid>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-1968</guid>
		<description>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.

/Henrik</description>
		<content:encoded><![CDATA[<p>That assumes that you have a clue on what&#8217;s wrong, which I didn&#8217;t &#8230; <img src='http://www.fourone.se/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>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.</p>
<p>/Henrik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santosh Ramamurthy</title>
		<link>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-1956</link>
		<dc:creator>Santosh Ramamurthy</dc:creator>
		<pubDate>Sun, 12 Oct 2008 13:36:08 +0000</pubDate>
		<guid>http://www.fourone.se/blog/2008/08/29/wrong-field-id-in-the-key-data-container-in-entity-key/#comment-1956</guid>
		<description>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. 
    entityKey.parmKeyDataMap(SysDictTable::getKeyData(vendTable)); 
    axdVendTable = AxdBase::newClassId(classnum(AxdVendTable)); 
    xmlDocument.loadXml(axdVendTable.read(entityKey, null, new  AifEndpointActionPolicyInfo(), new AifConstraintList(), aifPropertyBag)); 

    xmlDocument.save('c:\\VendTable_Out.xml'); 
} 

Would like to have your thoughts on the same</description>
		<content:encoded><![CDATA[<p>In AIF the following error is observed &#8220;Wrong field ID in the key data container in entity key&#8221; if the selected record is not found in the master table in order to send the data electronically.</p>
<p>A simple example would be as follows:</p>
<p>static void VendorOutbound(Args _args) </p>
<p>{<br />
    AxdVendTable                    axdVendTable;<br />
    AifEntityKey                    entityKey       = new AifEntityKey();<br />
    AifPropertyBag                   aifPropertyBag;<br />
    VendTable                          vendTable;<br />
    XmlDocument                     xmlDocument = new XmlDocument();<br />
    ; </p>
<p>    select firstonly vendTable where vendTable.VendId == &#8216;0000083_SO&#8217;;<br />
    //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.<br />
    entityKey.parmKeyDataMap(SysDictTable::getKeyData(vendTable));<br />
    axdVendTable = AxdBase::newClassId(classnum(AxdVendTable));<br />
    xmlDocument.loadXml(axdVendTable.read(entityKey, null, new  AifEndpointActionPolicyInfo(), new AifConstraintList(), aifPropertyBag)); </p>
<p>    xmlDocument.save(&#8217;c:\\VendTable_Out.xml&#8217;);<br />
} </p>
<p>Would like to have your thoughts on the same</p>
]]></content:encoded>
	</item>
</channel>
</rss>
