tag:blogger.com,1999:blog-47174849623965640682023-11-15T22:35:44.209-08:00Microsoft Dynamics Ax"Technical Blog..'Code snippets, x++ tools, How to's and new findings'"Unknownnoreply@blogger.comBlogger82125tag:blogger.com,1999:blog-4717484962396564068.post-13759703716900057802012-05-03T10:28:00.001-07:002012-05-03T10:39:01.577-07:00AX 2012 – Business Operation Framework - Create Batch without using RunBaseBatch Framework - Part I<p> </p> <p><u><strong>Introduction:</strong></u> <p>You can develop components / write business logic and later can be hosted as services on AOS with help of Windows communication foundation. These services later can be used by or integrated with the third party applications in order to communicate with Dynamics AX. <p><u><strong>BOF Artifacts:</strong></u> <p><strong>Data Contract Class: </strong> <p>By name only you can identify that this class is going to hold input parameters and query. In simple terms these are fields/controls which we add on ‘Dialog’ to get input from user like FromDate, query criteria’s through select button. <p>To identify class as Data Contract, we need to use [DataContractAttribute] as below, <p>And for parm methods, [DataMemberAttribute] <p><em>Note:Thumb rule, if you have 10 fields on ‘Dialog’ then you should have 10 parm method.</em> <p><strong>Service Operation Class: </strong> <p>This class contains main business logic for which you designed/create ‘Data Contract’ class. <p><strong>UI Builder Class: </strong> <p>BOF automatically generates ‘Dialog UI’ based upon Data Contract class, but if we wanted to access dialog fields at run time for validations like ‘enabled/allowEdit/Lookup’ then we need to create separate class for user interface. <p>Let us follow below steps in order to create batch class without using ‘RunBaseBatch’ framework, instead we make use of new BOF framework. <p><u><strong>Step1:</strong></u> <p>Create Data Contract class as below, <ol> <li>[DataContractAttribute]</li> <li><b>class</b> Tutorial_TestDataContract</li> <li>{</li> <li>TransDate transDate;</li> <li>CustAccount custAccount;</li> <li>}</li></ol> <p>For each variable, create parm method and add [DataMemberAttribute] as below, <ol> <li>[DataMemberAttribute]</li> <li><b>public</b> TransDate parmTransDate(TransDate _transDate = transDate)</li> <li>{</li> <li>transDate = _transDate;</li> <li><b>return</b> transDate;</li> <li>}</li></ol> <p>// <ol> <li>[DataMemberAttribute]</li> <li><b>public</b> CustAccount parmCustAccount(CustAccount _custAccount = custAccount)</li> <li>{</li> <li>custAccount = _custAccount;</li> <li><b>return</b> custAccount;</li> <li>}</li></ol> <p><u><strong>Step 2: </strong></u> <p>Once you done with data contract class, create class to write business logic which will make use of above input parameters. It’s like ‘run’ method of any batch class where we write actual business logic. <ol> <li><b>class</b> Tutorial_TestBatchServiceOperation <b>extends</b> SysOperationServiceController</li> <li>{</li> <li>}</li></ol> <p>Create ‘new’ method as below <ol> <li><b>public</b> <b>void</b> <b>new</b>(identifierName _className = "", identifierName _methodName = "", SysOperationExecutionMode _executionMode = <b>0</b>)</li> <li>{</li> <li><b>super</b>();</li> <li>this.parmClassName(_className);</li> <li>this.parmMethodName(_methodName);</li> <li>this.parmExecutionMode(_executionMode);</li> <li>} </li></ol> <p>Create ‘Construct’ method as below <ol> <li><b>public</b> <b>static</b> Tutorial_TestBatchServiceOperation construct()</li> <li>{</li> <li>ClassName className;</li> <li>MethodName runMethodName;</li> <li>SysOperationExecutionMode execMode = SysOperationExecutionMode::Synchronous;</li> <li>Tutorial_TestBatchServiceOperation testBatchServiceOp;</li> <li>className = <b>classStr</b>(Tutorial_TestBatchServiceOperation);</li> <li>runMethodName = <b>methodStr</b>(Tutorial_TestBatchServiceOperation, runMyLogic);</li> <li>testBatchServiceOp = <b>new</b> Tutorial_TestBatchServiceOperation(className,</li> <li>runmethodName,</li> <li>execMode);</li> <li>testBatchServiceOp.parmDialogCaption("Tutorial SysOperation Batch");</li> <li><b>return</b> testBatchServiceOp;</li> <li>}</li></ol> <p><i>//Method which will act as entry point to your business logic</i> <p><i>//You can compare this method to 'run' method of any class</i> <ol> <li><b>public</b> <b>void</b> runMyLogic(Tutorial_TestDataContract _data)</li> <li>{</li> <li>;</li> <li>info(<b>strFmt</b>("You entered %1, %2", _data.parmCustAccount(), _data.parmTransDate()));</li> <li>}</li></ol> <p>Finally main method to make class to run <ol> <li><b>public</b> <b>static</b> <b>void</b> main(Args args)</li> <li>{</li> <li>Tutorial_TestBatchServiceOperation testBatch;</li> <li>testBatch = Tutorial_TestBatchServiceOperation::construct();</li> <li>testBatch.startOperation();</li> <li>}</li></ol> <p><u><strong>Step3:</strong></u></p> <p>It’s very important to run ‘Incremental CIL Generation’ since above class will get executed on AOS.</p> <p><u><strong>Step4:</strong></u></p> <p>Run above class ‘Tutorial_TestBatchServiceOperation ‘ and you can see similar/familiar user interface for batch class</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9iZ-SsPomOHdA5voZQbUWwzhDA90qIrzP7OT43e8f2_7RMM9JU7cX9tBpVXU3PIL6nunLY2Vsh5hbCT1avemwEOlE_R_hHOSENO_JgNG04FB8h9HAa_DtEWyK-tYEhOI7vjFPo2lMgqo/s1600-h/image%25255B2%25255D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimZKGNgQ-IlnMoR9sYY8J872IVKFrsrD5-N_ateadlUcRNxXrJr7NE5WrunhxOPJXjunjYCQ-dT5EaP66ON6j1fyiNplrEeC1l7U6i9SKy72XctD4Zd6-hnrVzAlpBfxtORuG733ebbq4//?imgmax=800" width="244" height="133"></a> </p> <p>Click ‘Ok’ and you will get output as below</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJsD4Y0XmWJ6h6yCnkvVM3R7sjc9wv_0-yZtiDHfpn9XWvM4nTtLvtz05igvoP06z4SrwpyQN2gVBkie-swn9IsHXfKlubaY5C57OXk9wjy2kUhMflDl9D5vKIxENhmBF94N-xw8mZiCE/s1600-h/image%25255B5%25255D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUqO1uRmzIzM6JKqC0TOD2iecEoQGlrJPCpJrULM8YwFtDvd3cTRI0-Msa9ZcdtwE4cqWrjvtKrLuB6Sgp6-3BPzYloTEfK9-e-cgNSXY0EwA-IcLwgUTbYHfUt9ViPwV5XEPVbxcGx7o//?imgmax=800" width="244" height="107"></a> </p> <p>In next part will try to address how to access fields on dialog at run-time to control validations like ‘allowEdit/enabled’ etc….</p> <p>Untill then ‘Happy Batching :) ‘</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-44944930408933304352012-03-30T10:32:00.000-07:002012-04-01T07:31:54.709-07:00AX 2012 - X++ Code to 'Create and Post Purchase Order Invoice'<div dir="ltr" style="text-align: left;" trbidi="on">
Find below job to create and post purchase order in Dynamics AX 2012 <br />
<br />
<i>Note: Referring contoso demo data, 'CEU' company</i><br />
<br />
<div style="color: black;">
<div style="color: black;">
static void CreatePOAndInvoice(Args _args)</div>
<div style="color: black;">
{</div>
PurchTable purchTable;<br />
PurchLine purchLine;<br />
VendTable vendTable = VendTable::find("3008");<br />
AxPurchTable axPurchTable;<br />
AxPurchLine axPurchLine;<br />
PurchFormLetter purchFormLetter;<br />
<br />
//Create Purchase order<br />
purchTable.initFromVendTable(vendTable);<br />
<br />
axPurchTable = axPurchTable::newPurchTable(purchTable);<br />
axPurchTable.parmPurchaseType(PurchaseType::Purch);<br />
axPurchTable.parmDocumentStatus(DocumentStatus::PurchaseOrder);<br />
axPurchTable.parmAccountingDate(systemDateGet());<br />
axPurchTable.parmDeliveryDate(01\06\2012);<br />
axPurchTable.parmPurchStatus(PurchStatus::Backorder);<br />
axPurchTable.doSave();<br />
<br />
//Create PurchLine for item 1000<br />
purchLine.initFromPurchTable(purchTable);<br />
<br />
axPurchLine = AxPurchLine::newPurchLine(purchLine);<br />
axpurchLine.parmItemId("1000");<br />
axPurchLine.parmPurchQty(10);<br />
axPurchLine.parmPurchPrice(100);<br />
axPurchLine.doSave();<br />
<br />
//Posting PO Confirmation,I guess its mandatory <br />
//You cannot do invoice without doing PO confirm <br />
purchTable = axPurchTable.purchTable();<br />
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PurchaseOrder);<br />
purchFormLetter.update(purchTable, strFmt("Inv_%1", purchTable.PurchId));<br />
<br />
//Posting PO Invoice<br />
purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);<br />
purchFormLetter.update(purchTable, strFmt("Inv_%1", purchTable.PurchId));<br />
<br />
}</div>
<br />
'Always fun to explore and learn new stuffs'<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-47344721630134298262012-03-28T05:09:00.000-07:002012-03-28T05:09:24.476-07:00AX 2012 - How to debug Code in Visual Studio<div dir="ltr" style="text-align: left;" trbidi="on">
This post basically addresses how to debug code in Visual studio. <br />
Most of code running on AOS runs in CIL environment, so it cannot be debugg in Microsoft Dynamics AX Debugger.<br />
You might have confused/surprised why ax debugger is not opening inspite of inserting breakpoint at particular place. It means code might be running in CIL and to debug visual studio 2010 is required.<br />
<br />
<u>Step1: </u><br />
Make sure AOS Service runs on account which you logged in. Right click on AOS Service and change log on property to logged in windows credentials.<br />
Log off windows and then re log in. <br />
<br />
<u>Step2:</u><br />
Open visual studio and click on AX Application explorer (Shortcut Ctrl + D)<br />
AOT opens and you can browse nodes as you used to do in Dynamics AX.<br />
Open the object which you want to debug and insert breakpoint.<br />
<br />
<u>Step3:</u><br />
Then in Visual studio, Click on Debug->Attach process<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixzyg5LPHHWem_RX7_dfLca6TBX5zlVf95l_KcQKVky2b6lEElAp3co8JuQtP_j24ER81tOb0zjnDihLK8BbwFm3bm8c8Ao2pgp_PUdCCXWN3hh8VEbH-dPLyBDg8kYnBqPEExybbQn8A/s1600/VisualStudio_Debug.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixzyg5LPHHWem_RX7_dfLca6TBX5zlVf95l_KcQKVky2b6lEElAp3co8JuQtP_j24ER81tOb0zjnDihLK8BbwFm3bm8c8Ao2pgp_PUdCCXWN3hh8VEbH-dPLyBDg8kYnBqPEExybbQn8A/s320/VisualStudio_Debug.jpg" width="320" /></a></div>
<br />
As shown in above image, First make sure two check boxes at bottom are marked.<br />
Then only you can find and able to select AX32Serv.exe(AOS) process and click on attach button.<br />
<br />
<i>Note : When you are doing this step 3 for first time it prompts you to Restart Visual studio, kindly select the same option.</i><br />
<br />
<u>Step4:</u><br />
You done with setting up visual studio to debug code running in CIL.<br />
Now restrart process in Dynamics AX which you want to debugg and you can find Visual studio debugger opened for you.<br />
Continue debugging with hotkeys as you use to do in AX debugger like F10/F11.<br />
<br />
<br />
Happy Debugging :)<br />
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-42945209731064788972012-02-22T22:46:00.001-08:002012-02-22T22:47:12.252-08:00AX 2012 - Editor tips and tricks for fast development/coding<div dir="ltr" style="text-align: left;" trbidi="on">
Hi Friends,<br />
<br />
Long back i seen video on new improvements made to existing X++ Editor. Lot of features have been introduced to get look and feel of visual studio editor.<br />
Among all, I am very much impressed with 'Inserting Code Snippets' feature.<br />
- During coding in editor, if you want to create main method<br />
- You will make use of template and select main method or construct<br />
- But in 2012, <span style="background-color: yellow;"><b>just type main and click tab</b></span> will insert main method prototype.<br />
<br />
So thought of making video for same, watch it<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/B37yAOw6dlA?feature=player_embedded' frameborder='0'></iframe></div>
<br />
Really you will enjoy this new feature and finish development much faster compare to 2009.<br />
<br />
"Need is mother of all innovations"<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-72244280712192592392012-02-09T02:26:00.000-08:002012-02-09T02:36:49.262-08:00Dynamics AX 2012 - X++ code to create General Journal<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
static void Demo_CreateGLJournal(Args _args)<br />
{<br />
AxLedgerJournalTable journalTable;<br />
AxLedgerJournalTrans journalTrans;<br />
container accEntryPattern;<br />
container offSetEntryPattern;<br />
;<br />
<br />
journalTable = new AxLedgerJournalTable();<br />
journalTrans = new AxLedgerJournalTrans();<br />
<br />
//Journal Name<br />
journalTable.parmJournalName("GenJrn");<br />
journalTable.save();<br />
<br />
journalTrans.parmJournalNum(journalTable.ledgerJournalTable().JournalNum);<br />
journalTrans.parmTransDate(systemDateGet());<br />
journalTrans.parmAccountType(LedgerJournalACType::Ledger);<br />
<br />
<span style="background-color: yellow;"> //LedgerDimension => Ledgeraccount, DAX 2009</span><br />
accEntryPattern = ["601501", "601501", 0]; <br />
journalTrans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(accEntryPattern));<br />
<br />
journalTrans.parmAmountCurDebit(2000);<br />
<br />
<span style="background-color: yellow;">//OffsetLedgerDimension => OffsetLedgerAccount, DAX 2009</span><br />
offSetEntryPattern = ["401100", "401100", 0];<br />
journalTrans.parmOffsetAccountType(LedgerJournalACType::
Ledger );<br />
journalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(
offSetEntryPattern));<br />
<br />
journalTrans.save();<br />
<br />
info(strFmt("Journal %1 created", journalTable.ledgerJournalTable().JournalNum));<br />
}<br />
<br />
<b>How to post with Financial dimensions:</b><br />
<br />
<u>Format :</u><span style="background-color: white;"> </span><br />
<span style="background-color: white;">["DisplayValue", "MainAccount", NumberOfDimensions, "DimensionName", "DimensionValue"]</span>;
<br />
<br />
E.g:<br />
accEntryPattern = [<span style="background-color: yellow;">"601501-Test", "601501", 1, "Department", "OU_1"</span>]<br />
<br />
Enjoy exploring 2012 :)<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-25125782894083858842012-02-06T01:57:00.000-08:002012-02-06T01:57:47.416-08:00Enable/Disable Fact boxes, Preview Panes in AX2012 UX<div dir="ltr" style="text-align: left;" trbidi="on">
In Microsoft Dynamics AX 2012, if you want to disable factboxes/preview panes across application then you can do so.<br />
It's <span style="background-color: yellow;"><b>not recommended</b></span> to do this activity but this will help in <span style="background-color: yellow;"><b>troubleshooting performance</b></span> issues assoicated with <span style="background-color: yellow;"><b>opening forms</b></span> in ax2012 by controlling 'Timeout' parameter as below.<br />
<br />
Go to ->System Administration->Setup->Client performance options <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfv9YrpkJgR1TfhUHKmY-TEfmKRsVwfuU6rb3c05mRSYjAG4EajvP9ydHLzz16UL0X86KhtWr8zIYG_h-JemsYao30tUOiiTn3HbAydVJdr4NgK4Pz_I39JgmmkZicXrXwMPLcXi4p9pE/s1600/Client_perf.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfv9YrpkJgR1TfhUHKmY-TEfmKRsVwfuU6rb3c05mRSYjAG4EajvP9ydHLzz16UL0X86KhtWr8zIYG_h-JemsYao30tUOiiTn3HbAydVJdr4NgK4Pz_I39JgmmkZicXrXwMPLcXi4p9pE/s1600/Client_perf.jpg" /></a></div>
<br />
Visit <a href="http://blogs.msdn.com/b/axperf/archive/2011/11/07/ax2012-client-performance-options.aspx">Ax2012-client-performance-options</a> for detailed explaination by Ax performance team.<br />
<br />
Thanks axperf team :)<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-43097010797913203662012-01-02T04:10:00.000-08:002012-01-02T04:10:50.556-08:00Dynamics AX 2012 - Workflow Development in 2 hrs<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hi Friends,<br />
<br />
First of all would like to wish you all Very <span style="color: #0c343d; font-size: large;">"Happy and Dynamics new year -2012"</span>.<br />
<br />
You all might be aware/heard of new changes related to worklow architecture and development.<br />
So this post basically addresses,<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>1. Workflow Architecture changes<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>2. Workflow Development wizards<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>3. Generic class for submit/resubmit events on all workflows in AX.<br />
<br />
<br />
1. <span style="background-color: yellow;">Workflow Architecture changes</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>In 2012, AOS service has gone tremendous changes like<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Now you can directly host WCF services on AOS.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Earlier version we were using IIS to interact with WWF(Windows workflow foundation) and <br />
WCF (Windows communication foundation). <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Because of above change, now no need to install workflow component separately<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Just run the workflow configuration wizard (available in System administration->Setup)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Workflow templates/configuration were made available across companies/per company level.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>- Workflow template is renamed to Workflow types<br />
<br />
2. <span style="background-color: yellow;">Workflow Development through wizards.</span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Let us develop workflow for<br />
'Customer approval- New created customer should be approved through workflow'<br />
<br />
<u>Step 1</u>:<br />
Create a query for custTable say 'CustApprWorkflowQry' in AOT->Queries<br />
<br />
<u>Step 2</u>:<br />
Duplicate enum 'PurchReqWorkflowState' and rename it to 'CustApprWorkflowState' and drag it to CustTable Table.<br />
<br />
<u>Step 3</u>:<br />
Override 'canSubmitToWorkflow' method on Table->CustTable and paste below code.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
public boolean canSubmitToWorkflow(str _workflowType = '')<br />
{<br />
boolean ret;<br />
<br />
ret = this.RecId != 0 && this.CustApprWorkflowState ==<br />
CustApprWorkflowState::NotSubmitted;<br />
<br />
return ret;<br />
}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Create new method on CustTable as below to update worklow state during its life cycle.<br />
<br />
//BP Deviation documented<br />
public static void UpdateCustWorkflowState(RefRecId _recId, CustApprWorkflowState _state)<br />
{<br />
CustTable custTable = CustTable::findRecId(_recId, true);<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> ttsBegin;<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> custTable.CustApprWorkflowState = _state;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> custTable.update();<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> ttsCommit;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<br />
<u>Step 4</u>:<br />
Create workflow type (template/configuration) through wizard available in 2012.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Run wizard as below:<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>AOT->Workflow-> Workflow types (Right click ->Add-Ins-> workflow type wizard...<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Specify values as shown in below image<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyeyWwxhDj4vctZ_sWYp78jBj8bvA1WNHjFeijkaNbmwQE4krAcDhNaHFXQk9EgE_OkiAV0hESoNKiuO9eJjXkcqskZK0jgjoACv6az11PkEOpDW9BCBC8OAwKiCDbr7X5ItPs1mzBEVA/s1600/Workflow_Approval_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyeyWwxhDj4vctZ_sWYp78jBj8bvA1WNHjFeijkaNbmwQE4krAcDhNaHFXQk9EgE_OkiAV0hESoNKiuO9eJjXkcqskZK0jgjoACv6az11PkEOpDW9BCBC8OAwKiCDbr7X5ItPs1mzBEVA/s320/Workflow_Approval_1.jpg" width="320" /></a></div>
<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Click on next, as shown in below image wizard will create workflow eventhandlers class and menu items for you.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39Whw0tm74PUvnmsoNio3qdz2mNBEBRqLgQ-f6dSMXmg0k0q6emrvGvhgQ4hxX9ub_ZvKoxM4lwUB_9KRtD19mdWIC4_r-RxLr-C8aCHF-En3Mjwi4zk56Fh0l2eZqFziJT1FBzN3tPc/s1600/Workflow_Type_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh39Whw0tm74PUvnmsoNio3qdz2mNBEBRqLgQ-f6dSMXmg0k0q6emrvGvhgQ4hxX9ub_ZvKoxM4lwUB_9KRtD19mdWIC4_r-RxLr-C8aCHF-En3Mjwi4zk56Fh0l2eZqFziJT1FBzN3tPc/s320/Workflow_Type_2.jpg" width="320" /></a></div>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Paste below code to update workflow state.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void started(WorkflowEventArgs _workflowEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>CustTable::UpdateCustWorkflowState(_workflowEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::Submitted</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void completed(WorkflowEventArgs _workflowEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::Completed</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void canceled(WorkflowEventArgs _workflowEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::PendingCancellation</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<br />
<u>Step 5</u>:<br />
Create workflow approval through wizard available in 2012.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Run wizard as below:<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>AOT->Workflow-> Approvals (Right click ->Add-Ins-> Approval wizard...<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Specify values as shown in below image<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwgvhKFZsPoKXlcKkfbTmHo4BgM5-MFvDgbHpOcD2pg5RADuy4zOoDJ1BXsDEEIhG7eCcpPgIe7pRhECZotXqzXDZTfAoC_XmMhrQti8Vh1AeRF56lLA6wzrW_1-hZItQ_pJzUmR2gTss/s1600/Workflow_Approval_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwgvhKFZsPoKXlcKkfbTmHo4BgM5-MFvDgbHpOcD2pg5RADuy4zOoDJ1BXsDEEIhG7eCcpPgIe7pRhECZotXqzXDZTfAoC_XmMhrQti8Vh1AeRF56lLA6wzrW_1-hZItQ_pJzUmR2gTss/s320/Workflow_Approval_1.jpg" width="320" /></a></div>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Click on next, as shown in below image wizard will create workflow element eventhandlers and menu items for you.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijLra86uckTmcfiyCn5B2vtVnWXnBM7e1YpbbJvKGzYu5PQ6jp9risL-sTstb02ayD9JKqxpEsGmafdaFVMFkR2wWrZeHYs2HB9PVijDCKppa3DmGCUND45nf72aTO7Dud1qXWLsWOcp8/s1600/Workflow_Approval_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijLra86uckTmcfiyCn5B2vtVnWXnBM7e1YpbbJvKGzYu5PQ6jp9risL-sTstb02ayD9JKqxpEsGmafdaFVMFkR2wWrZeHYs2HB9PVijDCKppa3DmGCUND45nf72aTO7Dud1qXWLsWOcp8/s320/Workflow_Approval_2.jpg" width="320" /></a></div>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Paste below code to update workflow state.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void started(WorkflowElementEventArgs _workflowElementEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowElementEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::Submitted</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void returned(WorkflowElementEventArgs _workflowElementEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowElementEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::Returned</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void changeRequested(WorkflowElementEventArgs _workflowElementEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowElementEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::ChangeRequest</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void completed(WorkflowElementEventArgs _workflowElementEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
CustTable::UpdateCustWorkflowState(_workflowElementEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::Approved</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//BP Deviation Documented<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void canceled(WorkflowElementEventArgs _workflowElementEventArgs)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> CustTable::UpdateCustWorkflowState(_workflowElementEventArgs.parmWorkflowContext().parmRecId(), <span style="background-color: #fff2cc;">CustApprWorkflowState::PendingCancellation</span>);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<u>Step 6</u>:<br />
Enable workflow on CustTableListPage form and alos drag field CustApprWorkflowstate on form overview grid, as below<br />
<br />
CustTableListPage->Design, set properties as below<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLKuXi9E62DnOXn5c_N5JsU116QU0N6daJ6fP-gEEPMXAoAT7WXVxEvSdT4v_hXBy62_qC1Y9b1sr9ZJmspI1T2uFQMFnSVvoeavu1IMyRCyTxtqvn9S9wJQjiz_KjaI6Y_eO4z2_O0Y/s1600/Workflow_Form_Enable.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="62" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLKuXi9E62DnOXn5c_N5JsU116QU0N6daJ6fP-gEEPMXAoAT7WXVxEvSdT4v_hXBy62_qC1Y9b1sr9ZJmspI1T2uFQMFnSVvoeavu1IMyRCyTxtqvn9S9wJQjiz_KjaI6Y_eO4z2_O0Y/s320/Workflow_Form_Enable.jpg" width="320" /></a></div>
<br />
<u>Step 7</u>:<br />
Download below class to activate workflow on submit and resubmit.<br />
<br />
This is <span style="background-color: yellow;">generic class and with little modification can be used for all different worklow's in AX</span>.<br />
<a href="https://docs.google.com/open?id=0B9gM2KqOyzoZYjdiZWQzZTAtOTQ3My00ODJlLTg4MTktM2NiOTAzM2QzZTZk">Download Class XPO :</a><br />
<br />
Once you download and import class, change below menu-items associated with submit and resubmit actions.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRhUR2JeJnEynxmzHu8u_ZSXCxZFV1Nd1JvI582FKz3dO2CYuGEYXLXo24VZABRYbtIecSezoV_UjbNvjpzKY8qcbuH1tgb1c5tMBbY345XEXRX7TjkCM1pGZovj0172YnWGFB9G6YuAg/s1600/Workflow_Submit.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRhUR2JeJnEynxmzHu8u_ZSXCxZFV1Nd1JvI582FKz3dO2CYuGEYXLXo24VZABRYbtIecSezoV_UjbNvjpzKY8qcbuH1tgb1c5tMBbY345XEXRX7TjkCM1pGZovj0172YnWGFB9G6YuAg/s320/Workflow_Submit.jpg" width="320" /></a></div>
<br />
<br />
<u>Step 8</u>:<br />
Run Incremental CIL generation, AOT->Right click-> Incremental CIL generation<br />
<br />
You are done with development and can configure workflow in AR->Setup<br />
After activating above workflow configuration test it by creating new customer in CustTableListPage form.<br />
<br />
<span style="background-color: #93c47d; font-family: inherit;">Hope you enjoyed this new style of workflow development which will take 1-2 hours for any new basic workflow approval :) </span><br />
<br />
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4717484962396564068.post-29523995139580466042011-12-08T22:01:00.001-08:002011-12-08T22:17:01.717-08:00DAX 2012 Data Model - Global Address Information<div dir="ltr" style="text-align: left;" trbidi="on">
Hi Friends,<br />
<br />
In 2012 address table is obsolete (no longer used) and new tables have been introduced which follow normalization and avoid storing of redundant data.<br />
<br />
So this post basically<br />
- Describes about new data model<br />
- X++ job to illustrate how address and contact information can be migrated to AX 2012.<br />
<br />
- <span class="Apple-style-span" style="color: #274e13;"><b>New Data Model</b></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGEyt92Xw6fNEYu0jcMLH9MqzMCxSBKbA1gm8dcXS-igxSgmGn7V6cBHoZ5xX-mqo-UMTzI_J6_v3WAgXZZrg-ez5HN7cjRsKorzW8pXH96o-M5fS99BVAmIOHJl4f1vzWffmgHsmg-pE/s1600/2012_AddressRefactor.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGEyt92Xw6fNEYu0jcMLH9MqzMCxSBKbA1gm8dcXS-igxSgmGn7V6cBHoZ5xX-mqo-UMTzI_J6_v3WAgXZZrg-ez5HN7cjRsKorzW8pXH96o-M5fS99BVAmIOHJl4f1vzWffmgHsmg-pE/s320/2012_AddressRefactor.jpg" width="320" /></a></div>
-- <span class="Apple-style-span" style="color: #274e13;"><b>X++ Job</b></span><br />
<br />
Create CSV File from Dynamics AX 2009 as Customer.csv and place it on Desktop,<br />
Format :<br />
<span class="Apple-style-span" style="color: #38761d;"><b>[CustAccount, Name, Address, ZipCode, State, County, Email, MobileNo]</b></span><br />
<br />
<br />
<span class="Apple-style-span" style="color: #3d85c6;">static void Demo_CustomerAddrImport(Args _args)</span><br />
<span class="Apple-style-span" style="color: #3d85c6;">{</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> #WinAPI</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> CustTable custTable;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> DirPartyTable dirPartyTable;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsAddressZipCode zipCode;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsLocation logisticsLocation;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> DirPartyLocation partyLocation;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsPostalAddress postalAddress;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsElectronicAddress contactTable;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> DirPartyLocationRole partyLocationRole;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsLocationRole locationRole = LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> container roleId = [locationRole.RecId];</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsPostalAddressView postalAddrView;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> CommaIO commaIO = new CommaIO(strfmt("%1%2", WinAPI::getFolderPath(#CSIDL_DESKTOPDIRECTORY), "\\Customer.csv"), "r");</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> Container record;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> Name name;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> void createPostalAddr(LogisticsLocationRecId _recId, LogisticsPostalAddressView _postalAddrView)</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> {</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> LogisticsPostalAddressEntity postalAddrEntity = LogisticsPostalAddressEntity::construct(_recId);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> ;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddrEntity.createPostalAddress(_postalAddrView);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> }</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> ;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> while (commaIO.status() == IO_Status::Ok)</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> {</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> record = commaIO.read();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> name = conPeek(record, 2);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> custTable = custTable::find(conPeek(record, 1));</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> if (custTable)</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> {</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Create postal address</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation = LogisticsLocation::create("Legacy Postal Address", NoYes::Yes);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.Address = conPeek(record, 3);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.ZipCode = conPeek(record, 4);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.State = conPeek(record, 5);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.County = conPeek(record, 6);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.CountryRegionId = "DNK";</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.ValidFrom = DateTimeUtil::newDateTime(01\01\2010, 01);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> postalAddress.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Attach to party and sepecify address type like Delivery, Invoice</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.initValue();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Party = custTable.Party;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.IsPostalAddress = NoYes::Yes;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> DirPartyLocationRole::createPartyLocationRoles(partyLocation.RecId, roleId, false);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> if (conPeek(record, 7) != "")</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> {</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Create postal address</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation = LogisticsLocation::create("Email Contact", NoYes::Yes);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Locator = conPeek(record, 7);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Type = LogisticsElectronicAddressMethodType::Email;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Attach to party</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.initValue();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Party = custTable.Party;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> }</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> if (conPeek(record, 8) != "")</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> {</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Create postal address</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> logisticsLocation = LogisticsLocation::create("Phone Contact", NoYes::Yes);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Locator = conPeek(record, 8);</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.Type = LogisticsElectronicAddressMethodType::Phone;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> contactTable.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> // Attach to party</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.clear();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.initValue();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Party = custTable.Party;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.Location = logisticsLocation.RecId;</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> partyLocation.insert();</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> }</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> </span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> }</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"> }</span><br />
<span class="Apple-style-span" style="color: #3d85c6;">}</span><br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span><br />
Run job to migrate 2009 Customer address information to 2012.<br />
----Share more to Learn more---------<br />
<span class="Apple-style-span" style="color: #3d85c6;"><br /></span></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4717484962396564068.post-6538991323933622722011-09-05T08:07:00.000-07:002011-09-05T08:07:01.960-07:00Dynamics AX 2012 Development Certification Exam<div dir="ltr" style="text-align: left;" trbidi="on">
For all DAX Dev's who wanted to take certification exam on AX 2012 Development Introduction, refer below<br />
<br />
Exam Code : <b>MB6-869</b><br />
Topics : <span id="labelExamTopicsCovered" style="font-family: inherit;"><span class="DetailPagesContentText"></span></span><br />
<ul type="disc">
<li>Understanding Dynamics AX 2012 Architecture </li>
<li>Managing the Data Dictionary<strong></strong></li>
<li><div class="Abstract">
Managing the User Interface </div>
</li>
<li><div class="Abstract">
Managing Security </div>
</li>
<li><div class="Abstract">
Working with X++ Control Statements </div>
</li>
<li><div class="Abstract">
Managing Objects and Classes </div>
</li>
<li><div class="Abstract">
Accessing the Database </div>
</li>
<li><div class="Abstract">
Managing Exception Handling </div>
</li>
</ul>
<br />
<br />
For more details <a href="http://www.microsoft.com/learning/en/us/Exam.aspx?ID=MB6-869&Locale=en-us#tab1">Click here </a><br />
<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-74127775939939765622011-08-06T00:35:00.000-07:002011-08-06T05:17:44.694-07:00Dynamics AX 2012 Financial Dimensions<div dir="ltr" style="text-align: left;" trbidi="on">Hi Friends,<br />
<br />
Today we will be exploring the new changes related to Financial dimensions in AX 2012.<br />
<br />
<div style="color: #0c343d;"><b>Earlier versions AX 2009, 4.0 :</b></div><ul style="text-align: left;"><li>In older version System use to limit the creation of dimensions up to 10. </li>
<li>By default 3 dimensions were available in the system namely Department, CostCenter and Purpose.<br />
Technically these dimensions were controlled by Enum SysDimension and an array EDT Dimension.</li>
<li>So If we have 3 enum elements in SysDimension, then its corresponding array elements are stored in dimension EDT and can be referred as Dimension[0], Dimension[1].....</li>
<li>If you would like to store these dimension values against customized table, then simply we were adding the EDT Dimension to that Table. At Form level simply drag and drop field on Group then system use to show all the array elements as string control.</li>
</ul><b><span style="color: #0c343d;">New version AX 2012 (6.0) :</span></b> <br />
<br />
<ul style="text-align: left;"><li>In AX 60, their is no limit to dimension creations. One can create n number of dimensions as per organization requirements.</li>
<li>Technically their is huge change in framework, the way these dimensions used to be created and stored.</li>
<li>Firstly EDT Dimension (array) is deprecated and replaced with DimensionDefault (Int64 RecId). </li>
<li>Financial Dimensions master table Dimension is replaced with DimensionAttribute and DimensionValueDetails.</li>
<li>Now if one wish to store these dimension on your customized table then instead of EDT Dimension one should add DimensionDefault EDT. </li>
<li> At Form level make use of DimensionDefaultingController class to show the available dimensions.</li>
</ul><b><span style="color: #0c343d;">How to access Financial Dimensions values in AX 2012:</span></b> <br />
<br />
In earlier version, accessing dimension values was very simple like<br />
CustTable.Dimension[0] == Department value <br />
CustTable.Dimension[1] == CostCenter value<br />
CustTable.Dimension[2] == Purpose value<br />
<br />
In AX 60, since they have replaced Dimension EDT with RecId DimensionDefault we have to make use of Dimension helper classes to access values.So in CustTable you will find defaultDimension field which stores reference recId for DimensionAttributeSet. <br />
<br />
I am referring Customer 1101 in CEU Company, Contoso Demo Data for illustration purpose. Note the dimension values for this customer as shown in below snap.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO5MaMEoA7Wa_qjaJ5L8o9xelkobJPTnQANdwf-1JjRDO6Jo6oODTXYuP7FmWrrPXPt54EjywEMztgZQigB4YwBi_GR7uxyZ_82fY9EdeVlxghO1ciIBkHgXFH4u1Aq4IJPOUfqFgUMhw/s1600/FinancialDimensions.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO5MaMEoA7Wa_qjaJ5L8o9xelkobJPTnQANdwf-1JjRDO6Jo6oODTXYuP7FmWrrPXPt54EjywEMztgZQigB4YwBi_GR7uxyZ_82fY9EdeVlxghO1ciIBkHgXFH4u1Aq4IJPOUfqFgUMhw/s320/FinancialDimensions.jpg" width="320" /></a></div> <br />
Refer the code to access the values.<br />
<br />
<b>static void DEV_Dimension(Args _args)</b><br />
{<br />
CustTable custTable = CustTable::find("1101");<br />
DimensionAttributeValueSetStorage dimStorage;<br />
Counter i;<br />
<br />
dimStorage = DimensionAttributeValueSetStorage::find(custTable.DefaultDimension);<br />
<br />
for (i=1 ; i<= dimStorage.elements() ; i++)<br />
{<br />
info(strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name, <br />
dimStorage.getDisplayValueByIndex(i))); <br />
}<br />
<b>}</b> <br />
<br />
When you run the job, will see as below<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX-KSJ9rtDcn-LlEf9OJgtsBblg0YkcjjkJM6_U0hBc26TjT52Mlgee59JliJhsrZcMt1FZuQJTaT8QidFkAkWscWha-5fcxox9lUa-RmKuJCoBcCJ5bj80vqtXmph4E_cuy-HQuhyphenhyphenM28/s1600/DimensionOutput.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX-KSJ9rtDcn-LlEf9OJgtsBblg0YkcjjkJM6_U0hBc26TjT52Mlgee59JliJhsrZcMt1FZuQJTaT8QidFkAkWscWha-5fcxox9lUa-RmKuJCoBcCJ5bj80vqtXmph4E_cuy-HQuhyphenhyphenM28/s320/DimensionOutput.jpg" width="256" /></a></div><br />
I know that now you might have understood the importance of theses helper classes, they are making our lives easy :)</div>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-4717484962396564068.post-6298906867368203962011-08-05T23:17:00.000-07:002011-08-05T23:17:25.397-07:00Microsoft Dynamics AX 2012 released<div dir="ltr" style="text-align: left;" trbidi="on">Finally Microsoft announced public release of AX 60.<br />
<br />
Please visit <a href="http://www.microsoft.com/en-us/dynamics/products/ax-2012-launch.aspx">Product Launch</a><br />
<br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-49078906954210390112011-07-11T03:19:00.000-07:002011-07-11T03:19:52.959-07:00Batch Task Dependency in Dynamics AX 2009Hi,<br />
<br />
<b>Scenario : </b><br />
You want to schedule 2-3 tasks, but you would like to define dependency among tasks.<br />
Means Task1 should be executed only after completion of Task 3 and Task 2.<br />
<br />
<br />
<b>Advantage :</b><br />
You all might have heard of "Divide and Conquer Rule", So this also implements the same. <br />
Generally if you create batch to process 1000 Purchase orders then it might slow down the AOS performance and delay the overall batch performance.<br />
But if you create batch and create 10 tasks, each process 100 Purchase orders then will be fast compared to above procedure and will improve overall batch performance.<br />
<br />
<b>How to :</b><br />
In Dynamics AX 2009, Batch process will make use of below tables<br />
<ul><li> <u><i>BatchJob</i></u> : Main Job scheduler, consists of task</li>
<li> <u><i>BatchTask</i></u> : Task in batch which specifies what class to execute in order to achieve certain functionality.</li>
<li> <u><i>BatchConstraint</i></u> : Used to build dependencies among the tasks.</li>
</ul><br />
Create a Job, by using below code<br />
<br />
<b style="color: #073763;">static void Batch_CreateDependency(Args _args)<br />
{</b><span style="color: #073763;"> BatchJob batchJob;</span><br style="color: #073763;" /><span style="color: #073763;"> Batch batch;</span><br style="color: #073763;" /><span style="color: #073763;"> Tutorial_runBaseBatch testDependency;</span><br style="color: #073763;" /><span style="color: #073763;"> BatchConstraints batchConstraints;</span><br style="color: #073763;" /><span style="color: #073763;"> RefRecId RecId_Task1, recId_task2, recId_task3;</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> // Create task</span><br style="color: #073763;" /><span style="color: #073763;"> RefRecId createTask(str _msg)</span><br style="color: #073763;" /><span style="color: #073763;"> {</span><br style="color: #073763;" /><span style="color: #073763;"> ;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.clear();</span><br style="color: #073763;" /><span style="color: #073763;"> batch.initValue();</span><br style="color: #073763;" /><span style="color: #073763;"> batch.GroupId = '';</span><br style="color: #073763;" /><span style="color: #073763;"> batch.BatchJobId = batchJob.RecId;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.RunType = BatchRunType::Server;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.RetriesOnFailure = 0;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.AutomaticTransaction = NoYes::No;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.Caption = _msg;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.Status = BatchStatus::Waiting;</span><br style="color: #073763;" /><span style="color: #073763;"> batch.Company = curext();</span><br style="color: #073763;" /><span style="color: #073763;"> testDependency = Tutorial_runBaseBatch::construct();</span><br style="color: #073763;" /><span style="color: #073763;"> batch.ClassNumber = classidget(testDependency);</span><br style="color: #073763;" /><span style="color: #073763;"> batch.insert();</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> return batch.RecId;</span><br style="color: #073763;" /><span style="color: #073763;"> }</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> // Building dependencies</span><br style="color: #073763;" /><span style="color: #073763;"> void buildDependency(RefRecId _batchId, RefRecid _dependendRecId)</span><br style="color: #073763;" /><span style="color: #073763;"> {</span><br style="color: #073763;" /><span style="color: #073763;"> ;</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.clear();</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.initValue();</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.BatchId = _batchId;</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.DependsOnBatchId = _dependendRecId;</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.ExpectedStatus = BatchDependencyStatus::FinishedOrError;</span><br style="color: #073763;" /><span style="color: #073763;"> batchConstraints.insert();</span><br style="color: #073763;" /><span style="color: #073763;"> }</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> ;</span><br style="color: #073763;" /><br style="color: #073763;" /><span style="color: #073763;"> batchJob.clear();</span><br style="color: #073763;" /><span style="color: #073763;"> batchJob.initValue();</span><br style="color: #073763;" /><span style="color: #073763;"> batchJob.OrigStartDateTime = DateTimeUtil::newDateTime(systemDateGet(), DateTimeUtil::time(DateTimeUtil::utcNow()) + 10);</span><br style="color: #073763;" /><span style="color: #073763;"> batchJob.Status = BatchStatus::Waiting;</span><br style="color: #073763;" /><span style="color: #073763;"> batchJob.Caption = "Test Batch Dependency";</span><br style="color: #073763;" /><span style="color: #073763;"> batchJob.insert();</span><br style="color: #073763;" /><br style="color: #073763;" /><span style="color: #073763;"> recId_Task1 = createTask("Task 1");</span><br style="color: #073763;" /><span style="color: #073763;"> recId_Task2 = createTask("Task 2");</span><br style="color: #073763;" /><span style="color: #073763;"> recId_Task3 = createTask("Task 3");</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> buildDependency(recId_Task1, recId_Task2);</span><br style="color: #073763;" /><span style="color: #073763;"> buildDependency(recId_Task1, recId_Task3);</span><br style="color: #073763;" /><span style="color: #073763;"> </span><br style="color: #073763;" /><span style="color: #073763;"> info(strfmt("The %1 Job scheduled to run 3 tasks", batchJob.Caption));</span><br style="color: #073763;" /><span style="color: #073763;">}</span><br />
<br />
When you execute this Job, Go to Basic-->Inquiries-->Batch Job and you should see as below,<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpOSeXVfCcS0FTvs2r0Ia2Ah5AWdTDSFRBZqzaQdsmZWMETuH4uSkUIqoSnA1YzujATYGMvRcWgUW5sbMQ4_STr-2gP6coy_AC9dbZzGtomOaYvBMnfNYVfbXvPDknoRz59c6cqv6Bnj8/s1600/BatchDependency.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpOSeXVfCcS0FTvs2r0Ia2Ah5AWdTDSFRBZqzaQdsmZWMETuH4uSkUIqoSnA1YzujATYGMvRcWgUW5sbMQ4_STr-2gP6coy_AC9dbZzGtomOaYvBMnfNYVfbXvPDknoRz59c6cqv6Bnj8/s320/BatchDependency.jpg" width="320" /></a></div><br />
As per the snap, you can see Task 1 will be executed once Task 2 and Task 3 gets completed.<br />
<br />
Enjoy Multi Threading :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-41948782083065464182011-07-06T06:13:00.000-07:002011-07-06T06:13:18.315-07:00Dynamics AX 2009 SSRS Reports Tutorial Videos<div dir="ltr" style="text-align: left;" trbidi="on">Hi,<br />
<br />
I found list of "How to" videos on SSRS Reports development in Dynamics AX 2009.<br />
These are pretty good tutorials, so thought of sharing with you all,<br />
<br />
<a href="http://www.youtube.com/user/dynamicsaxbi?blend=23&ob=5">Dynamics AX 2009 SSRS Tutorials</a><br />
<br />
Enjoy</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-10508230623043419082011-06-30T09:05:00.000-07:002011-06-30T09:15:56.482-07:00.NET Proxies (Alternative to .NET Business Connector) in Dynamics AX 2012<div dir="ltr" style="text-align: left;" trbidi="on">If you recall in older versions of dynamics ax, .NET Business connector is used to integrate Microsoft applications with dynamics ax.<br />
In Dynamics AX 2012 , they come up with an alternative to .NET Business connector called as <b>.NET Proxy classes, </b>which in-turn use .NET Business Connector to communicate with AOS.<br />
<br />
Basically .NET Proxy class provides access to X++ Table, Class and Enum objects only.<br />
Advantage of .NET Proxy class<br />
<ul style="text-align: left;"><li><span class="Apple-style-span" style="font-family: inherit;"><span class="Apple-style-span"> Proxies require an early-bound programming model. The early-bound model enables the code editor to </span><span class="Apple-style-span"><b>provide IntelliSense.</b></span></span></li>
</ul><div><br />
</div><div><span class="Apple-style-span" style="font-family: inherit;">Following example try to illustrate the same, <b>(Referring Contoso Entertainment Demo data, CEU Company)</b> </span></div><div><span class="Apple-style-span" style="font-family: inherit;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: inherit;"><u>Step 1</u> : </span><br />
<span class="Apple-style-span" style="font-family: inherit;"> Open Visual studio 2010.</span></div><div></div><div><span class="Apple-style-span" style="font-family: inherit;"><u>Step 2</u> : </span><br />
<span class="Apple-style-span" style="font-family: inherit;"> Create C# Console application project. </span></div><div><span class="Apple-style-span" style="font-family: inherit;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: inherit;"><u>Step 3</u> : </span><br />
<span class="Apple-style-span" style="font-family: inherit;"> Add the project to AOT as below</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMmRmsZ52iAcH1XmdR6FTBg-VHqkGAVawXP7Qv6deJwXbCs07HizOYJ-co2Zqy6lcgROHSdjUvb70EgU9o4-b1QQQo6T_dSQzTu6GjBBMZ_-Rz9AlQz-zqZEY9nv2I1XOwXZr_fyS5Jhk/s1600/NETProxy1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMmRmsZ52iAcH1XmdR6FTBg-VHqkGAVawXP7Qv6deJwXbCs07HizOYJ-co2Zqy6lcgROHSdjUvb70EgU9o4-b1QQQo6T_dSQzTu6GjBBMZ_-Rz9AlQz-zqZEY9nv2I1XOwXZr_fyS5Jhk/s320/NETProxy1.jpg" width="320" /></a></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"><u>Step 4 :</u> </span><br />
<span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"> Generate proxy for table custTable, by adding to object to Project as below,</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7bqvKkGY3yHaDhgVP9sJw2esIEVWXOGP7o0L0GuBUNX9hxiw8RW4SPPQC1bvndcO9C4bL044qSiUmUffkYqQdnPXInPSqouA2aEX51lWT_qCeG6E7dqypx7WTS6Ob8Nfn1ahChLVwe7s/s1600/NETProxy2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7bqvKkGY3yHaDhgVP9sJw2esIEVWXOGP7o0L0GuBUNX9hxiw8RW4SPPQC1bvndcO9C4bL044qSiUmUffkYqQdnPXInPSqouA2aEX51lWT_qCeG6E7dqypx7WTS6Ob8Nfn1ahChLVwe7s/s320/NETProxy2.jpg" width="320" /></a></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;">Step 5 : </span><br />
<span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"> Add reference <b>"Microsoft.Dynamics.AX.ManagedInterop"</b></span><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"> to your project from <b>C:\..\AX60\Client\Bin Folder.</b></span><br />
<br />
<br />
</div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"> </span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;">Step 6 : </span><br />
<span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;"> Finally use the below code to print all the records from CustTable to console.</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhQpX5UpibBmxfbwrBA2JfdHyLBhMS5zFQ141HbpCN36ef6GwEIIS17UQuqZklJ83ukVnxdTuxQHeuJdiXJBtaoBhZQ-eEZC-5UQPtSJXOkmiCXHdfwlsGuksXz2-JheP1oCY03J1q_kM/s1600/NETProxy3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhQpX5UpibBmxfbwrBA2JfdHyLBhMS5zFQ141HbpCN36ef6GwEIIS17UQuqZklJ83ukVnxdTuxQHeuJdiXJBtaoBhZQ-eEZC-5UQPtSJXOkmiCXHdfwlsGuksXz2-JheP1oCY03J1q_kM/s320/NETProxy3.jpg" width="320" /></a></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;">Step 7 : When you build project, will see the output as below</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG1cclrCyMNoZrdwiXrYlG74A5gDW5qQ61q18Q9kj9W1cvrCJWKTwhP7BPDnPT7NvNpKrefv50O2Huw38uE19pgfGLYVzco-6PZIQA_CNWvyXpaEeNcAhs0TcpfQS9GkG6hlWQl-lAIAk/s1600/NETProxy5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG1cclrCyMNoZrdwiXrYlG74A5gDW5qQ61q18Q9kj9W1cvrCJWKTwhP7BPDnPT7NvNpKrefv50O2Huw38uE19pgfGLYVzco-6PZIQA_CNWvyXpaEeNcAhs0TcpfQS9GkG6hlWQl-lAIAk/s320/NETProxy5.jpg" width="320" /></a></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial;">Enjoyyyyy !!!!!!!!!!</span></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: x-small;"><br />
</span></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-71237402087747710712011-06-21T12:25:00.000-07:002011-06-21T12:25:37.943-07:00Dynamics AX 2012 Hands on Lab<div dir="ltr" style="text-align: left;" trbidi="on">Hi,<br />
<br />
Refer the below links (who doesn't have access to partner source) for hands on experience in AX 2012,<br />
<span class="Apple-style-span" style="color: #333333; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"></span><br />
<div class="content-fragment blog-post no-wrapper" id="fragment-46716" style="background-color: transparent; background-image: none; margin-bottom: 0px; margin-left: 8px; margin-right: 0px; margin-top: 0px;"><div class="content-fragment-inner msdn-content-fragment-inner"><div class="content-fragment-content" style="background-color: transparent; border-left-color: rgb(214, 214, 214); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(214, 214, 214); border-right-style: solid; border-right-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important;"><div class="full-post" style="margin-top: 0px; position: relative;"><div class="post-content user-defined-markup" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: initial; border-top-style: none; border-top-width: initial; line-height: 1.5em; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 22px; max-width: 100%; overflow-x: hidden; overflow-y: hidden; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 10px; position: relative;"><ol style="list-style-type: decimal;"><li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Workflow%20Implementation.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Workflow Implementation</span></span></a><span style="font-size: 11pt;"><o:p></o:p></span></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Accounts%20Payable.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Accounts Payable</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Accounts%20Receivable%20Enhancements.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Accounts Receivable Enhancements</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Expense%20Management.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Expense Management</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Migrating%20Reports%20to%20SSRS.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Migrating Reports to SSRS</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Employee%20Procurement.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Employee Procurement</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Client%20Forms.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Client Forms</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Export%20Extend%20and%20Refresh.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Export Extend and Refresh</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Edit%20Budgets%20in%20Excel.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Edit Budgets in Excel</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Sales%20Quotations%20in%20Word.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Sales Quotations in Word</span></span></a><o:p></o:p></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Import%20Data%20Using%20Excel.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Import Data Using Excel</span></span></a><span style="font-family: Calibri, sans-serif; font-size: 11pt;"></span></div></li>
<li><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><span style="font-family: Calibri, sans-serif; font-size: 11pt;"><a href="http://dynamics.demomate.com/PS/Dynamics%20AX/Project%20Accounting.html" style="color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"><span style="font-family: arial, helvetica, sans-serif;"><span style="font-size: xx-small;">Project Accounting</span></span></a></span> </div><div class="MsoListParagraph" style="margin-bottom: 0pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;"><br />
</div><div>Enjoy....The more you share, more you learn :)</div><div><br />
</div></li>
</ol><div style="clear: both;"></div></div><div class="post-attachment-viewer"></div><div class="post-actions" style="display: inline; line-height: 32px; position: relative;"><ul class="navigation-list" style="display: inline; line-height: 32px; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><li class="navigation-item" style="display: inline; line-height: 32px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;"><a class="internal-link view-replies" href="http://blogs.msdn.com/b/ukax/archive/2011/04/15/dynamics-ax-2012-hands-on-labs.aspx#comments" style="border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; color: #0066dd; cursor: pointer; font-weight: normal; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 8px; padding-left: 18px; padding-right: 10px; padding-top: 6px; position: absolute; text-decoration: none; visibility: hidden;"><span></span></a></li>
</ul></div></div><div class="full-post-footer"></div></div><div class="content-fragment-footer"></div></div></div><div class="content-fragment social-media-sharing no-wrapper" id="fragment-46717" style="background-color: transparent; background-image: none; margin-bottom: 0px; margin-left: 8px; margin-right: 0px; margin-top: 0px;"><div class="content-fragment-inner msdn-content-fragment-inner"><div class="content-fragment-content" style="background-color: transparent; border-left-color: rgb(214, 214, 214); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(214, 214, 214); border-right-style: solid; border-right-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px;"><div class="ShareThisMainPanel" style="background-color: white; float: right; margin-left: 10px; text-align: left; vertical-align: bottom; width: 130px; z-index: 2000;"><div class="ShareThis_ChildRootPanel" id="ctl00_content_ctl00_w_46717__954c05_ctl00_5c228737_5964_4a0a_936c_41ad2ea82201" style="text-align: left;"><div class="tierOnePanel" id="ctl00_content_ctl00_w_46717__954c05_ctl00_ShareThisBtnCollPanel_6a21299db299482a9f513bac1a6ad577" style="text-align: left; width: 130px;"></div></div></div></div></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-73669282758368269782011-06-20T11:30:00.000-07:002011-06-20T11:31:35.623-07:00Dynamics AX 2012 EP Preview<div dir="ltr" style="text-align: left;" trbidi="on">Have a look below for snapshot of Enterprise portal in AX 2012.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnCTzSdnm_Zk_ANzJxHxL29qJzSqcCvOyXHRxmajCN7yRmUwmZUH_onI3ZnL1VVAda0mzR9r3wIsQdqbffG0xopIFyD8IuTMdG_vWSDEEmDWCrx8FXmalOb5LJxoqXv93tS7uKAdtsL9g/s1600/EP_PreviewAX60.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnCTzSdnm_Zk_ANzJxHxL29qJzSqcCvOyXHRxmajCN7yRmUwmZUH_onI3ZnL1VVAda0mzR9r3wIsQdqbffG0xopIFyD8IuTMdG_vWSDEEmDWCrx8FXmalOb5LJxoqXv93tS7uKAdtsL9g/s320/EP_PreviewAX60.jpg" width="320" /></a></div><br />
<br />
New light weight UI Looks great, Isn't it ?<br />
<br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-2385993569400339302011-05-23T04:44:00.000-07:002011-05-23T04:45:42.836-07:00Dynamics AX 2012 Complete Architure<div dir="ltr" style="text-align: left;" trbidi="on">Hi,<br />
<br />
At a high level, the following snap will give you an overview of the Dynamics AX 2012 architecture and its supported technologies....<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfP2_8bNllTQgmiyOUZ4XHB66k2zYMvAlcI1RM7evUPAEz7tI6x02KnY3y4_5Blj6Mwsrw2qFCHsAuFJmGztFzVyjBblArxkGNlhrxzHPxAOjJfVN78fFC5-JK8VH9IGF2HvRyrxQImdw/s1600/DynamicsAx2012_Architecture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfP2_8bNllTQgmiyOUZ4XHB66k2zYMvAlcI1RM7evUPAEz7tI6x02KnY3y4_5Blj6Mwsrw2qFCHsAuFJmGztFzVyjBblArxkGNlhrxzHPxAOjJfVN78fFC5-JK8VH9IGF2HvRyrxQImdw/s320/DynamicsAx2012_Architecture.JPG" width="320" /></a></div><br />
Welcome the next big version of Dynamics AX :)<br />
<br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-36385569053796095172011-05-17T23:00:00.000-07:002011-05-17T23:00:02.440-07:00Dynamics Ax 2012 Installation Pre-requisites<div dir="ltr" style="text-align: left;" trbidi="on">Hi ,<br />
<br />
Following snap will give you an insight into the Dynamics Ax 2012 components and their supported operating systems.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirbMkh5296BKU2vwnR0lV9XMbALsLIBLnULwph3YPGm5z6DmNzOC6gCPe_UoqDgQTg4wRE9Anc6j7N3J1rcxEYosSM5wCMZgFHeW_KkH9RTNtd9jrt_u-NTbRjo_clifnWyZ899yPmSW4/s1600/Requisites_ServerOS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="99" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirbMkh5296BKU2vwnR0lV9XMbALsLIBLnULwph3YPGm5z6DmNzOC6gCPe_UoqDgQTg4wRE9Anc6j7N3J1rcxEYosSM5wCMZgFHeW_KkH9RTNtd9jrt_u-NTbRjo_clifnWyZ899yPmSW4/s320/Requisites_ServerOS.jpg" width="320" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtA0UI431F7XQMQlvBbyyEYa9hPdU9oFBF3xbDEF5sYCJAfnHD861YiTnS7eQsgU8w6teWWzw-50XR9X1lunNMWP9KQmGtoQVgdYsfOeFV8SE4bz7A_0gX8PWmoNPeG63fm2Q0FwCmbo/s1600/Requisites_DatabaseServer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtA0UI431F7XQMQlvBbyyEYa9hPdU9oFBF3xbDEF5sYCJAfnHD861YiTnS7eQsgU8w6teWWzw-50XR9X1lunNMWP9KQmGtoQVgdYsfOeFV8SE4bz7A_0gX8PWmoNPeG63fm2Q0FwCmbo/s320/Requisites_DatabaseServer.jpg" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxc37YPYvpG3bwbKPjaUpUk84C4-1Dl18VwRkHwKVQ1U8wJ_uEXoC9kEhbYKGf3mjg8P8SEDXDNpjJj3XLG6yJkPH6XtsgvuhzBeR72g1t1I9qw5OSxMbcDFxzE9kQrZkLUsXB5S9gK0g/s1600/64-bit+Operating+system+support.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxc37YPYvpG3bwbKPjaUpUk84C4-1Dl18VwRkHwKVQ1U8wJ_uEXoC9kEhbYKGf3mjg8P8SEDXDNpjJj3XLG6yJkPH6XtsgvuhzBeR72g1t1I9qw5OSxMbcDFxzE9kQrZkLUsXB5S9gK0g/s320/64-bit+Operating+system+support.jpg" width="275" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOddRlR4fMi6VVGWjSkIm8Fna9YphXrghJpsO9IS5k0pwZwA_BbqhQZocon_9O9kfgLSGTv7ddmg3VXbMkGZkzLbQgcY3Fxo6MhBHCa7d1FoMzbmFFF6emY5iRCEQRHAOKQqjkph0QMiE/s1600/SupportedClientOperatingSystems.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOddRlR4fMi6VVGWjSkIm8Fna9YphXrghJpsO9IS5k0pwZwA_BbqhQZocon_9O9kfgLSGTv7ddmg3VXbMkGZkzLbQgcY3Fxo6MhBHCa7d1FoMzbmFFF6emY5iRCEQRHAOKQqjkph0QMiE/s320/SupportedClientOperatingSystems.jpg" width="320" /> </a> </div><div class="separator" style="clear: both; text-align: center;"> </div><div class="separator" style="clear: both; text-align: center;"> </div><div class="separator" style="clear: both; text-align: center;"> </div> Enjoy the new ax installation :)</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-38993736897142432582011-03-25T21:32:00.000-07:002011-03-25T21:34:50.382-07:00Get Online Currency Exchange Rate in Dynamics Ax 2009<div dir="ltr" style="text-align: left;" trbidi="on">Hi,<br />
<br />
If you would like to show the current exchange rate as on today for any currency in Dynamics Ax 2009 , then have a look in below steps.<br />
<br />
I have developed DLL, which will interact with WebService to get the current exchange rate.<br />
For illustration purpose i have taken example of "USD" to "INR" conversion.<br />
<br />
Step 1 : <a href="https://docs.google.com/leaf?id=0B9gM2KqOyzoZZDZjMzZiMzMtOTg1MC00MzYwLWIyOTEtMzkzNGIxNTFlODFi&hl=en">Download the DLL</a> , and copy to Dynamics AX Client Bin Folder<br />
<br />
2 : Add reference in AOT (Right Click Reference node and select Add Reference)<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwPljv_DYBLY6oiyEZlF9cPd1FLIv1HUqkYos0KBDqFDZ8JYKpYeHQdv-_lO0cKfobzrKGEvh2F4Z_K_cy8f7-GODhO5ziZE77H6euFJdGeWrS9Rx3x7Y6t_etQHPn4sm-sfUiILap7c/s1600/WebServiceUtil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwPljv_DYBLY6oiyEZlF9cPd1FLIv1HUqkYos0KBDqFDZ8JYKpYeHQdv-_lO0cKfobzrKGEvh2F4Z_K_cy8f7-GODhO5ziZE77H6euFJdGeWrS9Rx3x7Y6t_etQHPn4sm-sfUiILap7c/s320/WebServiceUtil.jpg" width="320" /></a></div> Click on browse and select DLL which u copied in step1 and click Ok.<br />
<br />
3: Refresh the client and copy the following job.<br />
<br />
<div style="color: #0b5394;"><span style="font-size: small;"><b>static void WebService_CurrencyConversion(Args _args)<br />
{</b><br />
System.String exchRate;<br />
str convRate;<br />
#Define.fromCurrency('USD')<br />
#Define.toCurrency('INR')<br />
;<br />
<br />
new InteropPermission(InteropKind::ClrInterop);<br />
<br />
exchRate = WebServiceUtil.ServiceUtil::getExchRate(#fromCurrency, #toCurrency);<br />
<br />
convRate = exchRate;<br />
<br />
CodeAccessPermission::revertAssert();<br />
<br />
info(strfmt("1 %1 = %2 %3", #fromCurrency, convRate, #toCurrency));<br />
<br />
<b>}</b></span></div><span style="font-size: x-small;"><br />
</span><br />
<span style="font-size: x-small;"><span style="font-size: small;">Finally run this job and you will get the current exchange rate. </span></span><br />
<span style="font-size: x-small;"><span style="font-size: small;"><br />
</span></span><br />
<span style="font-size: x-small;"><span style="font-size: small;">You can use above logic and customize exchange rate form in Dynamics AX 2009 where the user can view exchange rate on that day.</span></span><br />
<span style="font-size: x-small;"><br />
</span><br />
<span style="font-size: x-small;"><span style="font-size: small;">Enjoy learning :)</span></span><br />
<br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-25389718256183252482011-02-04T02:04:00.000-08:002011-02-04T02:04:57.846-08:00New Feature , Type Hierarchies in Dynamics AX 2012<div dir="ltr" style="text-align: left;" trbidi="on">In DAX 2012 Developer workspace , you will find Type hierarchies under Tools menu which will list the hierarchy for the current object .<br />
For more details please have a look in below video.<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dzHI_dSb37vEMHFXMre-h6rWx7rzkdhUkuW4K8Dvk3owCWgcCCBIXY1swC4H-dxt0wWxl5qiUe9roTnGrBVPw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br />
I know after watching this video , you will be eagerly waiting to work in next AX Version , 2012.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-89284771865840075582011-02-04T00:28:00.000-08:002011-02-04T00:39:10.740-08:00Dynamics Ax 2012 (AX 6.0) Developer WorkSpace<div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" dir="rtl" style="clear: both; text-align: center;"></div>Have a look in new workspace mainly targeted for Development in Dynamics AX 2012.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dy1cgim4ScFielTzBuJzcTq5_SK3xg25FsrbMbo9z84_GZqTWR6j3Rz2a_pmljlMeUVYLhR4LxqMEA5ZP10sw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br />
Hope you will enjoy this new workspace !!!</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-58263113360255758502011-01-25T02:52:00.000-08:002011-01-25T02:52:35.092-08:00Database upgrade in AX 6.0 or Dynamics Ax 2012<div dir="ltr" style="text-align: left;" trbidi="on">I came across nice blog on database upgrade in new version AX6.0 and other cool features , please don't miss this ,<br />
<br />
<a href="http://blogs.msdn.com/b/mfp/archive/2011/01/21/getting-to-ax-2012.aspx">http://blogs.msdn.com/b/mfp/archive/2011/01/21/getting-to-ax-2012.aspx</a><br />
<br />
My main motive to share stuff about AX 6.0 is to make our self update with skills that will be going to use in new version when it hits market!!!</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4717484962396564068.post-22239729316507420942011-01-17T04:55:00.000-08:002011-01-18T03:51:25.767-08:00X++ CODE TO READ MS OFFICE WORD DOCUMENTUse the below job if you want to read text from MS Word document in Dynamics Ax 2009.<br />
<br />
<div style="color: #073763;"><b>static void FileIO_ReadFromWord(Args _args)</b></div><b><span style="color: #073763;">{</span></b> <span style="color: #073763;"> </span><br />
<span style="color: #073763;"> str document = "D:\\Demo Edition.doc";</span><br />
<div style="color: #0b5394;"> COM wordApplication;</div><div style="color: #0b5394;"> COM wordDocuments;</div><div style="color: #0b5394;"> COM wordDoc;</div><div style="color: #0b5394;"> COM range;</div><div style="color: #0b5394;"> TextBuffer txt = new TextBuffer();</div><div style="color: #0b5394;"> ;</div><div style="color: #0b5394;"><br />
</div><div style="color: #0b5394;"> // Create instance of Word application</div><div style="color: #0b5394;"> wordApplication = new COM("Word.Application");</div><div style="color: #0b5394;"><br />
</div><div style="color: #0b5394;"> // Get documents property</div><div style="color: #0b5394;"> wordDocuments = wordApplication.Documents();</div><div style="color: #0b5394;"><br />
</div><div style="color: #0b5394;"> // Add document that you want to read</div><div style="color: #0b5394;"> wordDoc = wordDocuments.add(document);</div><div style="color: #0b5394;"> range = wordDoc.range();</div><div style="color: #0b5394;"><br />
</div><div style="color: #0b5394;"> txt.setText(range.text());</div><div style="color: #0b5394;"><br />
</div><div style="color: #0b5394;"> // to replace carriage return with newline char</div><div style="color: #0b5394;"> txt.replace('\r', '\n'); </div><div style="color: #0b5394;"> </div><span style="color: #073763;"><span style="color: #0b5394;"> info(txt.getText())</span>;</span><br />
<b>}</b>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4717484962396564068.post-42273569490892457652011-01-17T04:37:00.000-08:002011-01-17T04:38:21.549-08:00Integrate Google Map in Dynamics AX 2009If you want to have feature for locating the customer/vendor addresses on Google map , than please have a look below ,<br />
<br />
On Address form i have added a button Google Map , if clicked it will <i><b><span style="background-color: #fff2cc; color: #20124d;">open Google Map inside AX!</span></b></i><br />
<br />
For Having fun , select any record and change the address information and click on Google Map <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHgvZqvnOmMBIK2fGgkLewr3GhUmkauGpSCa8jD_ictTKtr1gNbJdngTbh9mVxi4HlZoQhXiJp-UsPFeGxoTpd0OAwk297OfG8Uw4apOGSTVB8kPkCRQ6QE7ei8FqG-GpA44OiGqsI_XA/s1600/GoogleMap01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHgvZqvnOmMBIK2fGgkLewr3GhUmkauGpSCa8jD_ictTKtr1gNbJdngTbh9mVxi4HlZoQhXiJp-UsPFeGxoTpd0OAwk297OfG8Uw4apOGSTVB8kPkCRQ6QE7ei8FqG-GpA44OiGqsI_XA/s320/GoogleMap01.jpg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyHjuotkm57oAgFhU_fDFPZ7QN77PTCb8wIWIjXAwNqWV1x1lPvyDiEE0HzqD8K-oRKBRnpN1_U6vdx9BnRi_xmtgKuaBkqXoII5ndU0CMuTuKOsgT6Pc9MzaNM585lIZyVEK4gnzWLSk/s1600/GoogleMap02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyHjuotkm57oAgFhU_fDFPZ7QN77PTCb8wIWIjXAwNqWV1x1lPvyDiEE0HzqD8K-oRKBRnpN1_U6vdx9BnRi_xmtgKuaBkqXoII5ndU0CMuTuKOsgT6Pc9MzaNM585lIZyVEK4gnzWLSk/s320/GoogleMap02.jpg" width="320" /></a></div><div style="background-color: #fff2cc; color: #0c343d;"><b><a href="https://docs.google.com/leaf?id=0B9gM2KqOyzoZNjJhOGE2MzQtNWVhMS00NjNkLWE1NmItMzE4MzM4OTc3YmRi&hl=en">Download project</a></b></div><br />
Enjoy Learning AX !!!!Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-4717484962396564068.post-14785359509945080652011-01-11T19:41:00.000-08:002011-01-11T19:41:07.981-08:00HOW TO USE STR VARIABLES IN SQL WHERE EXPRESSION, DAX 2009I think most of us faced this issue , when we try to use str variable in X++ SQL statement like below<br />
<br />
<div style="color: #660000;"><i>"<span style="font-size: small;">Error: Container and unbounded string (text) fields are not allowed in a WHERE expression."</span></i></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbom0UoWUhHuhX63mS2D6TbkEWRBSUpeSIUT6IiUh1YVV8Xu7BlfdyiV56XycN-l-I0xdV9JGIPKN3d5V0QWn9Neo0EiiXISvep0SHmbnVEwTvmBvpCL84eV0Y6qggLP1ueLZP-9pDAQI/s1600/CompileError_str1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbom0UoWUhHuhX63mS2D6TbkEWRBSUpeSIUT6IiUh1YVV8Xu7BlfdyiV56XycN-l-I0xdV9JGIPKN3d5V0QWn9Neo0EiiXISvep0SHmbnVEwTvmBvpCL84eV0Y6qggLP1ueLZP-9pDAQI/s320/CompileError_str1.jpg" width="320" /></a></div><div> </div><div>Because when trying to use unbounded string variable within a select / where expression , it is <span style="background-color: #fff2cc; color: #0c343d;">expecting a limited sized string</span> , so the <b><span style="background-color: #fff2cc; color: #20124d;">solution is to limit the size</span></b> of variable as below</div><div> </div><div> </div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_r_IKpk6c_1tVBItHN00Bq4be4wZVR9oF8v5MCSTF3yu510m2tm4rx9NtMWzYnjhfvL3nxN48x0_z_cMpzsYd4WiOJUehyphenhyphenNn77TVQIVIKkul_zMxEc3XFbD3CcBNtxjb9BQMj3CbZIW8/s1600/CompileError_str2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_r_IKpk6c_1tVBItHN00Bq4be4wZVR9oF8v5MCSTF3yu510m2tm4rx9NtMWzYnjhfvL3nxN48x0_z_cMpzsYd4WiOJUehyphenhyphenNn77TVQIVIKkul_zMxEc3XFbD3CcBNtxjb9BQMj3CbZIW8/s320/CompileError_str2.jpg" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
Eventhough we are using string EDT's we won't get this error , because each string EDT will have its size.Unknownnoreply@blogger.com0