<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=426" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[AX 2012: Erweitern des Formulares zur Anlage von Produkten/Artikel]]></title>
<description><![CDATA[
<p>Um einen Artikel bzw. ein Produkt in Dynamics AX 2012 anzulegen, wird das Formular <strong>EcoResProductCreate </strong>verwendet. <br />
Dieses Formular enth&auml;lt entgegen den meisten Formularen keinerlei Datasources, womit beispielsweise neue Felder in der Tabelle <em>InventTable </em>vollst&auml;ndig anders implementiert werden m&uuml;ssen.
</p>

<p>Im folgenden eine Kurzbeschreibung zur Einbindung eines Beispielfeldes <em>MyCustomField </em>(vom Extended Datatype <em>MyCustomId</em>):
</p>

<p>1.) Hinzuf&uuml;gen einen Formcontrols auf Basis des EDT <em>MyCustomId</em> zum Formular und setzen der Eigenschaft <em>AutoDeclaration </em>auf <em>YES </em>und Vergabe eines eindeutigen Namens (beispielsweise gleichlautend wie der Name des Feldes)
</p>

<p>2.) Anpassen der Methode <strong>createData2Controls() </strong>des Formulares wie folgt:
</p>

<div class="div_blog_axcode">private void createData2Controls()<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp; data2Controls = [<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0,51,0)">//--&gt; (1)</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0,51,0)">//[tableStr(InventTable), [[fieldNum(InventTable, bomUnitId), formControlStr(EcoResProductCreate, BOMUnitId)]]],</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [tableStr(InventTable), [[fieldNum(InventTable, bomUnitId), formControlStr(EcoResProductCreate, BOMUnitId)],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [fieldNum(InventTable, MyCustomId), formControlStr(EcoResProductCreate, MyCustomField)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0,51,0)">//&lt;-- (1)</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [identifierStr(Purch), [[fieldNum(InventTableModule, UnitId), formControlStr(EcoResProductCreate, PurchUnitId)],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [fieldNum(InventTableModule, TaxItemGroupId), formControlStr(EcoResProductCreate, PurchTaxItemGroupId)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [identifierStr(Invent),[[fieldNum(InventTableModule, UnitId), formControlStr(EcoResProductCreate, InventUnitId)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [identifierStr(Sales), [[fieldNum(InventTableModule, UnitId), formControlStr(EcoResProductCreate, SalesUnitId)],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [fieldNum(InventTableModule, TaxItemGroupId), formControlStr(EcoResProductCreate, SalesTaxItemGroupId)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [tableStr(EcoResStorageDimensionGroupItem), [[fieldNum(EcoResStorageDimensionGroupItem, StorageDimensionGroup), formControlStr(EcoResProductCreate, StorageDimensionGroup)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [tableStr(EcoResTrackingDimensionGroupItem), [[fieldNum(EcoResTrackingDimensionGroupItem, TrackingDimensionGroup), formControlStr(EcoResProductCreate, TrackingDimensionGroup)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [tableStr(InventItemGroupItem), [[fieldNum(InventItemGroupItem, ItemGroupId), formControlStr(EcoResProductCreate, ItemGroupId)]]],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [tableStr(InventModelGroupItem), [[fieldNum(InventModelGroupItem, ModelGroupId), formControlStr(EcoResProductCreate, ModelGroupId)]]]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ];<br />
}
</div>

<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 02 Sep 2012 09:43:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=426</link>
<comments>https://www.schweda.net/blog_ax.php?bid=426</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=426</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=426</wfw:commentRss>
</item>
</channel>
</rss>	
