<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Santosh Ramamurthy AX Blog</title>
	<atom:link href="http://axblog4u.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://axblog4u.wordpress.com</link>
	<description>Technical contents related to Microsoft ERP Product (Dynamics AX)</description>
	<lastBuildDate>Thu, 01 May 2014 03:57:11 +0000</lastBuildDate>
	<language>en</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='axblog4u.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4915c13997591c8dd95b98b2895f48ac?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Santosh Ramamurthy AX Blog</title>
		<link>http://axblog4u.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://axblog4u.wordpress.com/osd.xml" title="Santosh Ramamurthy AX Blog" />
	<atom:link rel='hub' href='http://axblog4u.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Address/Contact Information: Export data using View in AX 2012</title>
		<link>http://axblog4u.wordpress.com/2014/01/29/addresscontact-information-export-data-using-view-in-ax-2012/</link>
		<comments>http://axblog4u.wordpress.com/2014/01/29/addresscontact-information-export-data-using-view-in-ax-2012/#comments</comments>
		<pubDate>Wed, 29 Jan 2014 11:35:56 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=520</guid>
		<description><![CDATA[Hello Everyone, It&#8217;s been a while since I have blogged and this time I will start on newer version named Dynamics AX2012. Before get into the act, I would like to take this opportunity to wish all a &#8220;Very Happy and Prosperous New Year 2014&#8243; AX2012 has implemented lot of changes in GAB and the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=520&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Hello Everyone,<br />
<br />It&#8217;s been a while since I have blogged and this time I will start on newer version named Dynamics AX2012. Before get into the act, I would like to take this opportunity to wish all a &#8220;Very Happy and Prosperous New Year 2014&#8243;<br />
<br />
AX2012 has implemented lot of changes in GAB and the way they function. This would ideally mean we should know the exact relation between tables to export relevant data. In order to validate the customer addresses/contact information it would be a huge task. So the question remains what is the simplest way to export Customer/Vendor address/contact information the same way as in Dynamics AX forms.<br />
<br />
<b>Note</b>: Although we have tools like DIXF/AIF for exporting data.<br />
<br />
<font COLOR="7A8B8B"><b>Exporting Customer Address</b></font>: The form data which is shown in Customer master is got from a view. Similar approach could be followed to export the data.<br />
<br />
Under AOT -&gt; Views and find Party postal address view (DirPartyPostalAddressView). If you try to browse through the data you shall find data corresponding to following fields which is similar to customer address section except to which customer it belong to.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2014/01/address.png"><img src="http://axblog4u.files.wordpress.com/2014/01/address.png?w=595&#038;h=300" alt="Address" width="595" height="300" class="align center size-full wp-image-526" /></a><br />
<br />
In DirPartyPostalAddressView click on Auto-report the following will be visible<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_autoreport1.png"><img src="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_autoreport1.png?w=595&#038;h=53" alt="PostalAddressView_AutoReport" width="595" height="53" class="align center size-full wp-image-527" /></a><br />
<br />
In order to get the Customer Id, Customer Name, Purpose(method: locationRoles) and Primary add the following code in the view and drag into Auto-Report and Synchronize it as shown in the image.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_code.png"><img src="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_code.png?w=595&#038;h=246" alt="PostalAddressView_Code" width="595" height="246" class="align center size-full wp-image-528" /></a><br />
<br />
<font COLOR="#659EC7">On viewing the Auto-report in the view the following result will be as below<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2014/01/dirparypostaladdressview.png"><img src="http://axblog4u.files.wordpress.com/2014/01/dirparypostaladdressview.png?w=595&#038;h=71" alt="DirPartyPostalAddressView" width="595" height="71" class="align center size-full wp-image-530" /></a><br />
<br />
<b>Note</b>: Since we are finding customer Id based on it Party from CustTable we might have accounts which are blank, so it could be others account as well like Vendors or warehouse address for which you need to handle via code.<br />
<br />
You can now export to excel easily. In case similar functionality is needed to get Contact information for customer/vendor, please follow the similar approach on DirPartyContactInfoView and get the required data ASAP.<br />
<br />
Hope this blog post is useful. Happing addressing <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span> in AX 2012.</font></span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/520/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=520&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2014/01/29/addresscontact-information-export-data-using-view-in-ax-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2014/01/address.png" medium="image">
			<media:title type="html">Address</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_autoreport1.png" medium="image">
			<media:title type="html">PostalAddressView_AutoReport</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2014/01/postaladdressview_code.png" medium="image">
			<media:title type="html">PostalAddressView_Code</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2014/01/dirparypostaladdressview.png" medium="image">
			<media:title type="html">DirPartyPostalAddressView</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip: Suppress &#8220;Save Changes&#8221; prompt when you close a Excel workbook using X++ in Dynamics AX</title>
		<link>http://axblog4u.wordpress.com/2012/09/07/tip-suppress-save-changes-prompt-when-you-close-a-excel-workbook-using-x-in-dynamics-ax/</link>
		<comments>http://axblog4u.wordpress.com/2012/09/07/tip-suppress-save-changes-prompt-when-you-close-a-excel-workbook-using-x-in-dynamics-ax/#comments</comments>
		<pubDate>Fri, 07 Sep 2012 00:52:41 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=509</guid>
		<description><![CDATA[In Microsoft Dynamics AX, to read data from excel worksheets the focus needs to shift on the active workbook. So when application is closed you&#8217;ll still find the process thread being shown up in Task manager and when trying to view the excel file a dialog prompt appears To suppress the following, try forcing a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=509&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
In Microsoft Dynamics AX, to read data from excel worksheets the focus needs to shift on the active workbook. So when application is closed you&#8217;ll still find the process thread being shown up in Task manager and when trying to view the excel file a dialog prompt appears<br />
<br />
<div id="attachment_510" style="width: 370px" class="wp-caption aligncenter"><a href="http://axblog4u.files.wordpress.com/2012/09/excel_tip.jpg"><img src="http://axblog4u.files.wordpress.com/2012/09/excel_tip.jpg?w=595" alt="" title="excel_tip"   class="size-full wp-image-510" /></a><p class="wp-caption-text">Prompt when you close workbook in Excel</p></div><br />
<br />
To suppress the following, try forcing a workbook to close without saving changes. The best way of implementing this via x++ code <font color="blue">[ <u>sysExcelWorkbook.saved(true)</u> ]</font><br />
<br />
<b>REASON:</b>If Saved property is set to True, Excel responds as though the workbook has already been saved and no changes have occurred since that last save.<br />
<br />
To know more on the way its handled in C#, refer MS link <a href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.saved(v=vs.80).aspx">Workbook.Saved Property</a></span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/509/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=509&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/09/07/tip-suppress-save-changes-prompt-when-you-close-a-excel-workbook-using-x-in-dynamics-ax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/09/excel_tip.jpg" medium="image">
			<media:title type="html">excel_tip</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip: COMVariantType for Real values in Dynamics AX</title>
		<link>http://axblog4u.wordpress.com/2012/09/06/tip-comvarianttype-for-real-values-in-dynamics-ax/</link>
		<comments>http://axblog4u.wordpress.com/2012/09/06/tip-comvarianttype-for-real-values-in-dynamics-ax/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 09:46:39 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=496</guid>
		<description><![CDATA[Case Study: Reading cell content from excel template for COM variant type VT_R4 or VT_R8 is always little tricky. Observation: Reading real value can be done in following ways 1) num2Str0(_variant.double(), 0); 2) num2str(_variant.double(), 0, numOfDec(_variant.double()), 1, 0); Here is the output which is generated where the first function value is always a round-off value [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=496&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<b>Case Study:</b> Reading cell content from excel template for COM variant type VT_R4 or VT_R8 is always little tricky.<br />
<br />
<b>Observation:</b> Reading real value can be done in following ways<br />
1) <font color="red">num2Str0(_variant.double(), 0);</font><br />
2) <font color="red">num2str(_variant.double(), 0, numOfDec(_variant.double()), 1, 0);</font><br />
<br />
            Here is the output which is generated where the first function value is always a round-off value compared with the second function which returns the exact content with correct scale and precision.<br />
<br />
<div id="attachment_502" style="width: 500px" class="wp-caption aligncenter"><a href="http://axblog4u.files.wordpress.com/2012/09/comvarianttype_real.jpg"><img src="http://axblog4u.files.wordpress.com/2012/09/comvarianttype_real.jpg?w=595" alt="" title="COMVariantType_Real"   class="size-full wp-image-502" /></a><p class="wp-caption-text">COMVariantType Functions output for Real values.</p></div><br />
</p>
<pre><code class="axapta"><span class="comment">/* 
Build excel template as following 
     and specify the path @ excel
=======================================
Column     Integer     Real                
=======================================
Rows(1)    123         60.9756097560976
Rows(2)    234         5.69105691056911
=======================================
*/</span>

<span class="keyword">static</span> <span class="keyword">void</span> SR_VariantType(Filename excel = @<span class="string">'C:\Projects\Data.xlsx'</span>)
{
    <span class="keyword">int</span>                 rows;
    <span class="keyword">int</span>                 columns;

    COMVariant          variant;
    SysExcelCells       sysExcelCells;
    SysExcelWorkbook    sysExcelWorkbook;
    SysExcelWorkbooks   sysExcelWorkbooks;
    SysExcelWorksheet   sysExcelWorksheet;
    SysExcelWorksheets  sysExcelWorksheets;
    SysExcelApplication sysExcelApplication;

    <span class="keyword">str</span> variant2Str(COMVariant _variant)
    {
        <span class="keyword">str</span> valueStr;
        ;

        <span class="keyword">switch</span>(_variant.variantType())
        {
            <span class="keyword">case</span> COMVariantType::VT_EMPTY   :
                valueStr = <span class="string">''</span>;
                <span class="keyword">break</span>;

            <span class="keyword">case</span> COMVariantType::VT_BSTR    :

                valueStr = _variant.bStr();
                <span class="keyword">break</span>;

            <span class="keyword">case</span> COMVariantType::VT_R4      :
            <span class="keyword">case</span> COMVariantType::VT_R8      :

                <span class="keyword">if</span>(_variant.<span class="keyword">double</span>())
                {
                    valueStr = strFmt(<span class="string">"@SYS311964"</span>, 
                                      num2Str0(_variant.<span class="keyword">double</span>(), <span class="number">0</span>),
                                      num2str(_variant.<span class="keyword">double</span>(),
                                      <span class="number">0</span>,
                                      numOfDec(_variant.<span class="keyword">double</span>()), 
                                      <span class="number">1</span>, 
                                      <span class="number">0</span>));
                }
                <span class="keyword">break</span>;

            <span class="keyword">default</span>                         :
                <span class="keyword">throw</span> error(strfmt(<span class="string">"@SYS26908"</span>, 
                                   _variant.variantType()));
        }

        <span class="keyword">return</span> valueStr;
    }
    ;

    sysExcelApplication = SysExcelApplication::construct();
    sysExcelWorkbooks   = sysExcelApplication.workbooks();

    <span class="keyword">try</span>
    {
        sysExcelWorkbooks.open(excel, 
                               <span class="keyword">false</span> <span class="comment">/*Update links*/</span>, 
                               <span class="keyword">true</span> <span class="comment">/*Read only*/</span>);
    }
    <span class="keyword">catch</span> (Exception::Error)
    {
        <span class="keyword">throw</span> error(strFmt(<span class="string">"@SYS76826"</span>, excel));
    }

    sysExcelWorkbook   = sysExcelWorkbooks.item(<span class="number">1</span>);
    sysExcelWorksheets = sysExcelWorkbook.worksheets();

    <span class="comment">// Only considering Sheet 1</span>
    sysExcelWorksheet  = sysExcelWorksheets.itemFromNum(<span class="number">1</span>);
    sysExcelCells      = sysExcelWorksheet.cells();

    <span class="comment">// Since in first row there will be field names.</span>
    <span class="keyword">for</span> ( rows = <span class="number">2</span>; rows &lt;= <span class="number">3</span>; rows++)
    {
        <span class="keyword">for</span> (columns = <span class="number">1</span>; columns &lt;= <span class="number">2</span>; columns++)
        {
            variant = sysExcelCells.item(rows, columns).value();
            print variant2Str(variant);
            pause;
        }
    }

    <span class="comment">// Close Excel</span>
    sysExcelApplication.quit();

    variant             = <span class="keyword">null</span>;
    sysExcelWorkbooks   = <span class="keyword">null</span>;
    sysExcelWorkbook    = <span class="keyword">null</span>;
    sysExcelWorksheet   = <span class="keyword">null</span>;
    sysExcelCells       = <span class="keyword">null</span>;
    sysExcelApplication = <span class="keyword">null</span>;
}</code></pre>
<p>Whenever reading cell content w.r.t real values always try using the function 2 specified above. Happy A(x)celing <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span> </span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/496/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=496&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/09/06/tip-comvarianttype-for-real-values-in-dynamics-ax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/09/comvarianttype_real.jpg" medium="image">
			<media:title type="html">COMVariantType_Real</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip: QueryValue function in Dynamics AX</title>
		<link>http://axblog4u.wordpress.com/2012/09/06/tip-queryvalue-function-in-dynamics-ax/</link>
		<comments>http://axblog4u.wordpress.com/2012/09/06/tip-queryvalue-function-in-dynamics-ax/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 07:21:59 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=482</guid>
		<description><![CDATA[Case Study: Below a sample example is illustrated on how queryValue usage impacts the data retreival in reports based on different customer data. Note: Enlarge the screen to view the actual content of the blog Please check out for the XPO in the shared location: SharedProject_Tip_QueryValue &#124; haPPy qURERING vALUE in AX :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=482&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<b>Case Study:</b> Below a sample example is illustrated on how queryValue usage impacts the data retreival in reports based on different customer data.<br />
<br />
<b><u>Note</u>:</b> Enlarge the screen to view the actual content of the blog<br />
<br />
<div id="attachment_483" style="width: 610px" class="wp-caption aligncenter"><a href="http://axblog4u.files.wordpress.com/2012/09/tip_queryvalue.jpg"><img src="http://axblog4u.files.wordpress.com/2012/09/tip_queryvalue.jpg?w=595" alt="" title="Tip_QueryValue"   class="size-full wp-image-483" /></a><p class="wp-caption-text">Global function queryValue</p></div><br />
Please check out for the XPO in the shared location: <a href="https://skydrive.live.com/embed?cid=264A0056CBCBB1D3&amp;resid=264A0056CBCBB1D3%21642">SharedProject_Tip_QueryValue</a> | haPPy qURERING vALUE in AX <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span></span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/482/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=482&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/09/06/tip-queryvalue-function-in-dynamics-ax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/09/tip_queryvalue.jpg" medium="image">
			<media:title type="html">Tip_QueryValue</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading Selected Node in XML &#8211; Dynamics AX2012</title>
		<link>http://axblog4u.wordpress.com/2012/08/21/reading-selected-node-in-xml-dynamics-ax2012/</link>
		<comments>http://axblog4u.wordpress.com/2012/08/21/reading-selected-node-in-xml-dynamics-ax2012/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 10:08:29 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=473</guid>
		<description><![CDATA[Case Study: Below a sample job is illustrated to read selected (multiple) nodes from a given XML. private static void SR_ReadSelectedNode_XML(Filename fileName) { #define.node('INFORMATION//ROWS/ROW') XmlDocument xmlDocument; XmlNode xmlInformationNode; XmlNodeList xmlInformationsNodeList; XmlNodeList xmlChildNodeList; int i; int j; fileName = @'C:\Projects\ReadNode.xml'; xmlDocument = xmlDocument::newFile(fileName); xmlInformationsNodeList = xmlDocument.documentElement() .selectNodes(#node); setPrefix("@SYS98689"); for ( i = 0; i &#60; xmlInformationsNodeList.length(); [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=473&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<b>Case Study:</b> Below a sample job is illustrated to read selected (multiple) nodes from a given XML.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2012/08/readnode_xml.jpg"><img src="http://axblog4u.files.wordpress.com/2012/08/readnode_xml.jpg?w=595" alt="" title="ReadNode_xml"   class="aligncenter size-full wp-image-474" /></a><br />
</p>
<pre><code class="axapta"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> SR_ReadSelectedNode_XML(Filename fileName)
{
    <span class="preprocessor">#define.node('INFORMATION//ROWS/ROW')</span>
    XmlDocument xmlDocument;
    XmlNode     xmlInformationNode;
    XmlNodeList xmlInformationsNodeList;
    XmlNodeList xmlChildNodeList;
    <span class="keyword">int</span>         i;
    <span class="keyword">int</span>         j;

    fileName                = @<span class="string">'C:\Projects\ReadNode.xml'</span>;
    xmlDocument             = xmlDocument::newFile(fileName);
    xmlInformationsNodeList = xmlDocument.documentElement()
                                         .selectNodes(<span class="preprocessor">#node);</span>
    
    setPrefix(<span class="string">"@SYS98689"</span>);

    <span class="keyword">for</span> ( i = <span class="number">0</span>; i &lt; xmlInformationsNodeList.length(); i++)
    {
        xmlChildNodeList = xmlInformationsNodeList.item(i)
                                                  .childNodes();
        
        <span class="keyword">for</span> (j = <span class="number">0</span>; j &lt; xmlChildNodeList.length() ; j++) 
        {
            xmlInformationNode = xmlChildNodeList.item(j);

            <span class="keyword">if</span> (xmlInformationNode.baseName() == <span class="string">'DETAILS'</span>)
            {
                info(xmlInformationNode.innerXml());
                <span class="keyword">break</span>;
            }
        }        
    }
}</code></pre>
<p>
<a href="http://axblog4u.files.wordpress.com/2012/08/xml_info.jpg"><img src="http://axblog4u.files.wordpress.com/2012/08/xml_info.jpg?w=595" alt="" title="XML_Info"   class="aligncenter size-full wp-image-479" /></a><br />
Happy dAX(ml)ING <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span> <span class='wp-smiley emoji emoji-tongue' title=':P'>:P</span></span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/473/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=473&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/08/21/reading-selected-node-in-xml-dynamics-ax2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/08/readnode_xml.jpg" medium="image">
			<media:title type="html">ReadNode_xml</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/08/xml_info.jpg" medium="image">
			<media:title type="html">XML_Info</media:title>
		</media:content>
	</item>
		<item>
		<title>Generating Lookups using SysAttributes Class &#8211; Dynamics AX2012</title>
		<link>http://axblog4u.wordpress.com/2012/06/19/generating-lookups-using-sysattributes-class-dynamics-ax2012/</link>
		<comments>http://axblog4u.wordpress.com/2012/06/19/generating-lookups-using-sysattributes-class-dynamics-ax2012/#comments</comments>
		<pubDate>Tue, 19 Jun 2012 09:44:11 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>
		<category><![CDATA[field group]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=468</guid>
		<description><![CDATA[Case Study: In earlier or current release we have different ways of displaying lookups using table lookup, field group lookups, building reference lookup from custom form using FormAutoLookupFactory. Building custom lookups for displaying AOT elements using SysModelElements/UtilElementsId was usually performed by Query/QueryBuildDataSource instead we can generate same using SysAttribute . Similiar type of functionality is [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=468&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<b>Case Study:</b> In earlier or current release we have different ways of  displaying lookups using table lookup, field group lookups, building reference lookup from custom form using FormAutoLookupFactory.<br />
<br />
Building custom lookups for displaying AOT elements using SysModelElements/UtilElementsId was usually performed by Query/QueryBuildDataSource instead we can generate same using SysAttribute . Similiar type of functionality is implemented across AX2012 and one such instance is usage of attribute for displaying Workflow queues.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2012/06/lookup-using-sysattribute.jpg"><img src="http://axblog4u.files.wordpress.com/2012/06/lookup-using-sysattribute.jpg?w=595" alt="Generating lookups using Attributes" title="Lookup using SysAttribute"   class="aligncenter size-full wp-image-469" /></a><br />
<br />
<b><u>Design Approach:</u></b> We are building runtime lookup by checking attributes whose values are &#8216;True&#8217; and adding to the temporary table. This way we would display all the classes which has the following attribute syntax:<br />
<br />
<b><u>[SysClassEnabledAttributes(boolean::true, classStr(SysEnabledDocument))]</u></b><br />
<br />
Where SysClassEnabledAttributes is a attribute base class which extends SysAttribute which helps us to build the required lookup.<br />
<br />
<b><u>Code Pattern:</u></b><br />
</p>
<pre><code class="axapta"><span class="comment">/// &lt;summary&gt;</span>
<span class="comment">///    Finds the classes that extend the </span>
<span class="comment">///    &lt;c&gt;SysEnabledAttributes&lt;/c&gt; class that are queue enabled.</span>
<span class="comment">/// &lt;/summary&gt;</span>
<span class="comment">/// &lt;returns&gt;</span>
<span class="comment">///    A &lt;c&gt;SysAttributeTmp&lt;/c&gt; table buffer.</span>
<span class="comment">/// &lt;/returns&gt;</span>
<span class="keyword">public</span> <span class="keyword">static</span> SysAttributeTmp  getAllAttributes()
{
    <span class="preprocessor">#define.sysAttribute("SysClassEnabledAttributes")</span>
    SysAttributeTmp                    attributes;
    List                               list;
    SysDictClass                       dictClass;
    DictClass                          currentClass;
    ListEnumerator                     listEnumerator;
    <span class="keyword">boolean</span>                            flag = <span class="keyword">true</span>;
    SysClassEnabledAttributes          attribute;

    dictClass = <span class="keyword">new</span> SysDictClass(classNum(AbstractAttributesClass));
    listEnumerator = <span class="keyword">new</span> ListEnumerator();
    list           = dictClass.extendedBy();
    listEnumerator = list.getEnumerator();

    <span class="keyword">while</span> (listEnumerator.moveNext())
    {
        currentClass = <span class="keyword">new</span> DictClass(listEnumerator.current());

        attribute = currentClass.getAttribute(<span class="preprocessor">#sysAttribute);</span>
        <span class="keyword">if</span> (attribute != <span class="keyword">null</span>)
        {
            flag = attribute.parmFlag();

            <span class="keyword">if</span> (flag)
            {
                attributes.Name        = dictClass.name();
                attributes.Description = attribute.parmName();
                attributes.insert();
            }
        }
    }

    <span class="keyword">return</span> attributes;
}</code></pre>
<p>
Please check out for the design implementation in the shared location. Happy Attributing AX2012 <span class='wp-smiley emoji emoji-wink' title=';)'>;)</span><br />
<a href="https://skydrive.live.com/?cid=264A0056CBCBB1D3&amp;id=264A0056CBCBB1D3%21635#cid=264A0056CBCBB1D3&amp;id=264A0056CBCBB1D3%21630">SharedProject_Lookup_Attributes</a><br />
<br /></span></p><br /> Tagged: <a href='http://axblog4u.wordpress.com/tag/field-group/'>field group</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/468/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=468&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/06/19/generating-lookups-using-sysattributes-class-dynamics-ax2012/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/06/lookup-using-sysattribute.jpg" medium="image">
			<media:title type="html">Lookup using SysAttribute</media:title>
		</media:content>
	</item>
		<item>
		<title>Display Web Image Content in Forms using Dynamics AX2012</title>
		<link>http://axblog4u.wordpress.com/2012/05/28/display-web-image-content-in-forms-using-dynamics-ax2012/</link>
		<comments>http://axblog4u.wordpress.com/2012/05/28/display-web-image-content-in-forms-using-dynamics-ax2012/#comments</comments>
		<pubDate>Mon, 28 May 2012 13:25:12 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>
		<category><![CDATA[enterprise-it]]></category>
		<category><![CDATA[external image]]></category>
		<category><![CDATA[image content]]></category>
		<category><![CDATA[software-development]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=445</guid>
		<description><![CDATA[Case Study: In this demo scenario, we are going to display Web Image Content on forms using Dynamics AX2012. For this demo, I have taken a clue from my exisiting colleague Sreenath Reddy (Thanks Sreenath) to build a web image content. Image:AX2012 Source Code The web image content are read using StreamReader class and set [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=445&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Case Study: In this demo scenario, we are going to display Web Image Content on forms using Dynamics AX2012. For this demo, I have taken a clue from my exisiting colleague Sreenath Reddy (Thanks Sreenath) to build a web image content.</span></p>
<p><b> Image:AX2012</b><br />
<a href="http://axblog4u.files.wordpress.com/2012/05/imagecontent.jpg"><img class="aligncenter size-full wp-image-447" title="imageContent" src="http://axblog4u.files.wordpress.com/2012/05/imagecontent.jpg?w=595" alt=""   /></a></p>
<p><b> Source Code</b><br />
<a href="http://axblog4u.files.wordpress.com/2012/05/imagecontent_2.jpg"><img src="http://axblog4u.files.wordpress.com/2012/05/imagecontent_2.jpg?w=595" alt="" title="imageContent_2"   class="size-full wp-image-452" /></a><br />
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"> <br />
The web image content are read using StreamReader class and set into the X++ form. Using the above code snippet you can populate the external image which is required there by not actually requiring to store in local drives.<br />
<br />
<b>Note:</b> Any external URL (HTML source code) needs to be read by textBuffer class and according fill the image content)<br />
&nbsp;<br />
Please give a try to this wonderful application which is built on AX2012 <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span> Happy Streaming data using AX2012 <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span></span><br />
</p>
<p>Download Source code link: <a href="https://skydrive.live.com/?sc=documents&amp;cid=264a0056cbcbb1d3#cid=264A0056CBCBB1D3&amp;id=264A0056CBCBB1D3%21635">SharedProject_AX_WebImageContent</a></p><br /> Tagged: <a href='http://axblog4u.wordpress.com/tag/enterprise-it/'>enterprise-it</a>, <a href='http://axblog4u.wordpress.com/tag/external-image/'>external image</a>, <a href='http://axblog4u.wordpress.com/tag/image-content/'>image content</a>, <a href='http://axblog4u.wordpress.com/tag/software-development/'>software-development</a>, <a href='http://axblog4u.wordpress.com/tag/technology/'>technology</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=445&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/05/28/display-web-image-content-in-forms-using-dynamics-ax2012/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/05/imagecontent.jpg" medium="image">
			<media:title type="html">imageContent</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/05/imagecontent_2.jpg" medium="image">
			<media:title type="html">imageContent_2</media:title>
		</media:content>
	</item>
		<item>
		<title>Generation of CodePage using X++</title>
		<link>http://axblog4u.wordpress.com/2012/04/25/generation-of-codepage-using-x/</link>
		<comments>http://axblog4u.wordpress.com/2012/04/25/generation-of-codepage-using-x/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 11:40:36 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=433</guid>
		<description><![CDATA[Case Study: In this demo scenario, we are going to build Windows Code page using X++ class. For this project, I have build a generation class which basically returns the list of available codePage. private void buildCodePage() { System.Text.EncodingInfo[] encodingInfoArray; System.Text.EncodingInfo encodingObject; RecordInsertList recordInsertList = new RecordInsertList(tableNum(CodePageTable)); System.Exception ex; InteropPermission permission = new InteropPermission(InteropKind::ClrInterop); ; [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=433&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Case Study: In this demo scenario, we are going to build Windows Code page using X++ class.<br />
For this project, I have build a generation class which basically returns the list of available codePage.<br />
<br />
</span></p>
<pre><code class="axapta"><span class="keyword">private</span> <span class="keyword">void</span> buildCodePage()
{
    System.Text.EncodingInfo[]    encodingInfoArray;
    System.Text.EncodingInfo      encodingObject;

    RecordInsertList              recordInsertList =  
                                  <span class="keyword">new</span> RecordInsertList(tableNum(CodePageTable));
    System.Exception              ex;
    InteropPermission             permission = 
                                  <span class="keyword">new</span> InteropPermission(InteropKind::ClrInterop);
    ;

    <span class="comment">// Clear always the codePage data is available</span>
    delete_from codePage;

    <span class="keyword">try</span>
    {
        permission.assert();
        encodingInfoArray = System.Text.Encoding::GetEncodings();

        <span class="comment">// BP Deviation Documented.</span>
        <span class="keyword">for</span> (i = <span class="number">0</span>; i &lt;= 
                    CLRInterop::getAnyTypeForObject(
                    encodingInfoArray.get_Length()) - <span class="number">1</span>; 
            i++ )
        {
            encodingObject = encodingInfoArray.GetValue(i);

            codePage.CodePage    = System.Convert::ToString(
                                   encodingObject.get_CodePage());
            codePage.DisplayName = System.Convert::ToString(
                                   encodingObject.get_DisplayName());

            recordInsertList.add(codePage);
        }

        <span class="keyword">ttsbegin</span>;
                recordInsertList.insertDatabase();
        ttsCommit;

        CodeAccessPermission::revertAssert();
    }
    <span class="keyword">catch</span> (Exception::CLRError)
    {
        ex = ClrInterop::getLastException();

        <span class="keyword">if</span> (ex != <span class="keyword">null</span>)
        {
            ex = ex.get_InnerException();
            <span class="keyword">if</span> (ex != <span class="keyword">null</span>)
            {
                error(ex.ToString());
            }
        }
    }
}</code></pre>
<p>
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Once this code is executed the runtime formRun displays the required output as shown below.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2012/04/codepage.jpg"><img src="http://axblog4u.files.wordpress.com/2012/04/codepage.jpg?w=595" alt="This form displays the codePage" title="CodePage"   class="aligncenter size-full wp-image-437" /></a><br />
<br />
AX2012 DLink: <a href="https://skydrive.live.com/#!/?cid=264a0056cbcbb1d3!cid=264A0056CBCBB1D3&amp;id=264A0056CBCBB1D3%21630&amp;sc=documents">SharedProject_CodePage</a> happy AX2012 <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span><br />
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
AX20009 DLink: <a href="https://skydrive.live.com/#!/?cid=264a0056cbcbb1d3!cid=264A0056CBCBB1D3&amp;id=264A0056CBCBB1D3%21617&amp;sc=documents">SharedProject_CodePage</a> happy AX2009 <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span><br />
</span></span></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=433&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/04/25/generation-of-codepage-using-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/04/codepage.jpg" medium="image">
			<media:title type="html">CodePage</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamics AX2012: Create Custom Service using X++</title>
		<link>http://axblog4u.wordpress.com/2012/01/24/dynamics-ax2012-create-custom-service-using-x/</link>
		<comments>http://axblog4u.wordpress.com/2012/01/24/dynamics-ax2012-create-custom-service-using-x/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 12:48:31 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[X++ stuffs]]></category>
		<category><![CDATA[inbound port]]></category>
		<category><![CDATA[new service group]]></category>
		<category><![CDATA[visual studio tools]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=365</guid>
		<description><![CDATA[Case Study: In this demo scenario, we create a custom service to find the inventory onhand physical item quantity from AX2012. To expose any Custom Service, method should be &#8216;public&#8217; Access Specifiers &#38; should be defined by an attribute named &#8216;[SysEntryPointAttribute(true)]&#8216;. For this project, I have a created a sample InventoryOnHand service which basically returns [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=365&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="margin:0;"><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Case Study: In this demo scenario, we create a custom service to find the inventory onhand physical item quantity from AX2012.<br />
<br />
To expose any Custom Service, method should be &#8216;public&#8217; Access Specifiers &amp; should be defined by an attribute named &#8216;[SysEntryPointAttribute(true)]&#8216;.<br />
<br />
<a href="http://axblog4u.files.wordpress.com/2012/01/customservice.jpg"><img src="http://axblog4u.files.wordpress.com/2012/01/customservice.jpg?w=595" alt="" title="CustomService"   class="alignleft size-full wp-image-369" /></a><br />
<br />
For this project, I have a created a sample InventoryOnHand service which basically returns the number of qty for a given Item.<br />
</p>
<pre><code class="axapta"><span class="class"><span class="keyword">class</span> <span class="title">InventOnhandService</span>
{</span>
}

[SysEntryPointAttribute(<span class="keyword">true</span>)]
<span class="keyword">public</span> InventQty itemOnHandPhysical(ItemId  _itemId = <span class="string">''</span>)
{
    SalesLine       salesLine;
    InventOnhand    inventOnHand;
    InventMovement  movement;
    InventQty       qty = <span class="number">0</span>;

    select firstOnly salesLine
        where salesLine.ItemId == _itemId;

    <span class="keyword">if</span> (salesLine)
    {
        movement     = InventMovement::construct(salesLine);
        inventOnhand = InventOnhand::newPhysicalUpdate(movement, 
                                                       movement.inventdim());

        qty          = inventOnHand.availPhysical();
    }

    <span class="keyword">return</span> qty;
}</code></pre>
<p>
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Next step is to create a &#8216;Service&#8217; &amp; map the custom class with newly created service. By which you could exposed all public methods which are in the scope of current class. Please proceed further by Creating a New Service Group &amp; Add it to Service Node Reference. Please mark the &#8216;Auto Deploy&#8217; property to &#8216;Yes&#8217; on the Service group (properties).<br />
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Right click on the created Service group and click &#8216;Deploy Service Group&#8217;. This would deploy all the relavent artifacts to the Inbound port under System Administration module.<br />
<a href="http://axblog4u.files.wordpress.com/2012/01/in_port.jpg"><img src="http://axblog4u.files.wordpress.com/2012/01/in_port.jpg?w=595" alt="" title="In_Port"   class="alignleft size-full wp-image-370" /></a><br />
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
In order to test your custom Service application, simply start VS Command prompt (or) traverse through Start -&gt; AllPrograms -&gt; Microsoft Visual Studio 2010 -&gt; Visual Studio Tools -&gt; Visual Studio Command Prompt<br />
<span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
Enter wcftestclient, space and then paste the WSDL URI (which you can find on the deployed Inbound port)<br />
<a href="http://axblog4u.files.wordpress.com/2012/01/vsc.jpg"><img src="http://axblog4u.files.wordpress.com/2012/01/vsc.jpg?w=595" alt="" title="VSC"   class="alignleft size-full wp-image-372" /></a> </p>
<p><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<br /> When the WCF test client starts double click on your method &#8216;itemOnHandPhysical&#8217;(in my case) and specify the value under request by passing the _itemId (i.e. 1290 in my case) the invoke function will return the appropriate response of the available physical quantity of an item from the AX2012.</p>
<p><a href="http://axblog4u.files.wordpress.com/2012/01/wcf_test.jpg"><img src="http://axblog4u.files.wordpress.com/2012/01/wcf_test.jpg?w=595" alt="" title="WCF_Test"   class="alignleft size-full wp-image-373" /></a></p>
<p><span style="font-family:'Trebuchet MS';color:#204063;font-size:10pt;"><br />
<br />
Download Link: <a href="https://skydrive.live.com/redir.aspx?cid=264a0056cbcbb1d3&amp;resid=264A0056CBCBB1D3!632&amp;parid=264A0056CBCBB1D3!630">InventoryOnHandService</a> happy servicing AX2012 <span class='wp-smiley emoji emoji-smile' title=':)'>:)</span><br />
</span></span></span></span></span></span></span></p><br /> Tagged: <a href='http://axblog4u.wordpress.com/tag/inbound-port/'>inbound port</a>, <a href='http://axblog4u.wordpress.com/tag/new-service-group/'>new service group</a>, <a href='http://axblog4u.wordpress.com/tag/visual-studio-tools/'>visual studio tools</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=365&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/01/24/dynamics-ax2012-create-custom-service-using-x/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/01/customservice.jpg" medium="image">
			<media:title type="html">CustomService</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/01/in_port.jpg" medium="image">
			<media:title type="html">In_Port</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/01/vsc.jpg" medium="image">
			<media:title type="html">VSC</media:title>
		</media:content>

		<media:content url="http://axblog4u.files.wordpress.com/2012/01/wcf_test.jpg" medium="image">
			<media:title type="html">WCF_Test</media:title>
		</media:content>
	</item>
		<item>
		<title>My Blog Review in 2011</title>
		<link>http://axblog4u.wordpress.com/2012/01/01/my-blog-review-in-2011/</link>
		<comments>http://axblog4u.wordpress.com/2012/01/01/my-blog-review-in-2011/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 17:13:39 +0000</pubDate>
		<dc:creator><![CDATA[Santosh.R]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://axblog4u.wordpress.com/?p=362</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 14,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=362&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<p>	<a href="/2011/annual-report/"><img src="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" width="100%" alt="" /></a></p>
<p>Here&#8217;s an excerpt:</p>
<blockquote><p>The concert hall at the Syndey Opera House holds 2,700 people.  This blog was viewed about <strong>14,000</strong> times in 2011.  If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many people to see it.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axblog4u.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axblog4u.wordpress.com/362/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axblog4u.wordpress.com&#038;blog=16586570&#038;post=362&#038;subd=axblog4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axblog4u.wordpress.com/2012/01/01/my-blog-review-in-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a2cf22e2b4661502ed11d468e39d0061?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">santosh8483</media:title>
		</media:content>

		<media:content url="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" medium="image" />
	</item>
	</channel>
</rss>
