<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0"><id>tag:blogger.com,1999:blog-5277756027683167030</id><updated>2026-05-04T00:10:45.699+02:00</updated><category term="Dynamics AX"/><category term="MOSS 2007"/><category term="SharePoint"/><category term="Axapta"/><category term="X++"/><category term="WSS 3.0"/><category term="Dynamics AX 2012"/><category term="Links"/><category term="Project Accounting"/><category term="Search"/><category term="SharePoint Designer"/><category term="Inventory Management"/><category term="application templates"/><category term="Alerts"/><category term="BDC"/><category term="Custom Field Types"/><category term="Excel 2007"/><category term="Supply Chain Management"/><category term="authentication"/><category term="Blogging Tips"/><category term="Outlook"/><category term="Word 2007"/><category term="Workflow"/><category term="Accounts Receivable"/><category term="CEWP"/><category term="Intercompany"/><category term="Reports"/><category term="Accounts Payable"/><category term="BI"/><category term="Freeware"/><category term="PowerPoint 2007"/><category term="backup"/><category term="BOM"/><category term="CQWP"/><category term="Fill Utility"/><category term="InfoPath"/><category term="Master planning"/><category term="Office"/><category term="Office Add-ins"/><category term="Visio 2007"/><category term="Word"/><category term="AIF"/><category term="CIL"/><category term="Case Management"/><category term="Configuration Key"/><category term="Data Migration"/><category term="Dynamics 365 FO"/><category term="Enterprise Portal"/><category term="Event Handlers"/><category term="Excel"/><category term="HTML"/><category term="LCS"/><category term="Manufacturing"/><category term="Microsoft Virtual PC"/><category term="Organization Model"/><category term="Procurement"/><category term="Quarantine Orders"/><category term="Retail"/><category term="SQL"/><category term="SQL Server"/><category term="SQL Server 2000"/><category term="Sales and Marketing"/><category term="Security"/><category term="Shipment"/><category term="Task Scheduler"/><category term="Trade Agreement Evaluation"/><category term="Version Control"/><category term="WMS"/><category term="Windows"/><category term="XML"/><title type="text">IT Pro Ramblings</title><subtitle type="html">My 2p about Information Worker Solutions and other software products.</subtitle><link href="http://patrikluca.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default?redirect=false" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/" rel="alternate" type="text/html"/><link href="http://pubsubhubbub.appspot.com/" rel="hub"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default?start-index=26&amp;max-results=25&amp;redirect=false" rel="next" type="application/atom+xml"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><generator uri="http://www.blogger.com" version="7.00">Blogger</generator><openSearch:totalResults>139</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-6767861893870079263</id><published>2018-05-02T15:43:00.001+02:00</published><updated>2018-05-02T15:54:03.655+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics 365 FO"/><category scheme="http://www.blogger.com/atom/ns#" term="LCS"/><title type="text">Getting framework with id ‘012345’ failed from Lifecycle Services</title><content type="html">&lt;h3&gt;Problem description: Getting framework with id ‘012345’ failed from Lifecycle Services&lt;/h3&gt;  &lt;p&gt;While trying to open a Task recording from Lifecycle Services you receive this error suddenly, while you were able to open Task recordings on your environment before&lt;/p&gt;  &lt;span id = "fullpost"&gt;&lt;h3&gt;Solution&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Log in on the AOS of your environment&lt;/li&gt;    &lt;li&gt;Open Microsoft SQL Server Management Studio&lt;/li&gt;    &lt;li&gt;Execute following queries on the AxDB database:      &lt;br /&gt;delete SYSOAUTHCONFIGURATION where SECURERESOURCE = '&lt;a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flcsapi.lcs.dynamics.com&amp;amp;data=02%7C01%7CPatrik.Luca%40adultimagroup.com%7C73f37152a394439ab3fc08d5b0302fe5%7C3c2c919b877a4cd6be64b25bbdaee76f%7C0%7C0%7C636608643365262533&amp;amp;sdata=TJaz1gBfb6ZiDM%2B76HdXjIsRlcjpjApKKYykwRcJems%3D&amp;amp;reserved=0"&gt;https://lcsapi.lcs.dynamics.com&lt;/a&gt;'       &lt;br /&gt;delete SYSOAUTHUSERTOKENS where SECURERESOURCE = '&lt;a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flcsapi.lcs.dynamics.com&amp;amp;data=02%7C01%7CPatrik.Luca%40adultimagroup.com%7C73f37152a394439ab3fc08d5b0302fe5%7C3c2c919b877a4cd6be64b25bbdaee76f%7C0%7C0%7C636608643365262533&amp;amp;sdata=TJaz1gBfb6ZiDM%2B76HdXjIsRlcjpjApKKYykwRcJems%3D&amp;amp;reserved=0"&gt;https://lcsapi.lcs.dynamics.com&lt;/a&gt;'       &lt;br /&gt;select * from sysoauthusertokens       &lt;br /&gt;select * from SYSOAUTHCONFIGURATION       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; delete SYSHELPSETUP       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; delete SysLCSLibrary       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; delete SysLCSProject       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; delete SysHelpCPSSetup&lt;/li&gt;    &lt;li&gt;Go to Dynamics 365 FO and go to Help (?) &amp;gt; Support&lt;/li&gt;    &lt;li&gt;Click the ‘Click here to connect to Lifecycle Services’ link in the Connect to Lifecycle Services prompt. This will refresh the OAuth token for LCS.&lt;/li&gt;    &lt;li&gt;Go to System Administration &amp;gt; Setup &amp;gt; System Parameters. In the Help tab, under Task Guide and Support contact, select the correct LCS project. &lt;/li&gt; &lt;/ol&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/6767861893870079263/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/6767861893870079263?isPopup=true" rel="replies" title="5 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6767861893870079263" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6767861893870079263" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2018/05/getting-framework-with-id-012345-failed.html" rel="alternate" title="Getting framework with id ‘012345’ failed from Lifecycle Services" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-3927047607960795229</id><published>2015-01-08T21:26:00.001+01:00</published><updated>2015-01-08T21:29:42.382+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><category scheme="http://www.blogger.com/atom/ns#" term="Version Control"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Modifying Security in application workspace not possible if version control is enabled</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Problem description: modifying Security in application workspace not possible if version control is enabled&lt;/h3&gt;&lt;/span&gt;  &lt;p&gt;In case version control is enabled, it is not possible anymore to create new &lt;strong&gt;Security roles&lt;/strong&gt;, new &lt;strong&gt;Duties&lt;/strong&gt;, copy &lt;strong&gt;Duties&lt;/strong&gt;, delete &lt;strong&gt;Duties&lt;/strong&gt; through the &lt;strong&gt;Dynamics AX application workspace&lt;/strong&gt;. You always have to open a &lt;strong&gt;development workspace&lt;/strong&gt; and have access to the &lt;strong&gt;AOT&lt;/strong&gt;.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Solution: disable check on version control&lt;/h3&gt; &lt;o&gt;Modify following objects in the &lt;strong&gt;AOT&lt;/strong&gt; to enable modifying &lt;strong&gt;Security&lt;/strong&gt; in the application workspace with version control enabled.  &lt;p&gt;&lt;/p&gt;  Class &lt;strong&gt;SysSecTree&lt;/strong&gt;, method &lt;strong&gt;canDoStuff&lt;/strong&gt;:  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;…&lt;br /&gt;boolean        rootSelected, atLeastOneNodeSelected;&lt;br /&gt;&lt;br /&gt;// BGN to allow user to create security duties through GUI in case version control is on&lt;br /&gt;//if (SysSecHelper::isVersionControlOn() || !treeControl)&lt;br /&gt;//{&lt;br /&gt;//    return [false, false, false, false, false, false];&lt;br /&gt;//}&lt;br /&gt;if (!treeControl)&lt;br /&gt;{&lt;br /&gt;    return [false, false, false, false, false, false];&lt;br /&gt;}&lt;br /&gt;// END&lt;br /&gt;&lt;br /&gt;idx = treeControl.getFirstSelected();&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Form &lt;strong&gt;SysSecRolesEditTasks&lt;/strong&gt;, method &lt;strong&gt;init&lt;/strong&gt;:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;...&lt;br /&gt;    refreshSingleSecurityButton.visible(true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// BGN&lt;br /&gt;// to allow user to create security roles through GUI &lt;br /&gt;// in case version control is on&lt;br /&gt;//&lt;br /&gt;//if (SysSecHelper::isVersionControlOn())&lt;br /&gt;//{&lt;br /&gt;//    this.enableReadOnlyMode();&lt;br /&gt;//}&lt;br /&gt;//else&lt;br /&gt;//{&lt;br /&gt;//    roleName.viewEditMode(ViewEditMode::Edit);&lt;br /&gt;//    roleDescription.viewEditMode(ViewEditMode::Edit);&lt;br /&gt;//}&lt;br /&gt;&lt;br /&gt;roleName.viewEditMode(ViewEditMode::Edit);&lt;br /&gt;roleDescription.viewEditMode(ViewEditMode::Edit);&lt;br /&gt;// END&lt;br /&gt;&lt;br /&gt;sysTreeControl = new SysSecTreeControl(this as Object);&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/3927047607960795229/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/3927047607960795229?isPopup=true" rel="replies" title="5 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3927047607960795229" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3927047607960795229" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2015/01/modifying-security-in-application.html" rel="alternate" title="Modifying Security in application workspace not possible if version control is enabled" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-908353471941856308</id><published>2014-12-01T14:43:00.001+01:00</published><updated>2014-12-01T14:43:39.714+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Configuration Key"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Retail"/><title type="text">Limited Main menu after activating Retail configuration key</title><content type="html">&lt;h3&gt;Problem description: Limited Main menu after activating Retail configuration key&lt;/h3&gt;  &lt;p&gt;After activating a Retail configuration key, restarting &lt;strong&gt;Dynamics AX&lt;/strong&gt; client only shows one menu item in the Main menu: &lt;strong&gt;Retail Essentials&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Also some buttons aren’t available anymore on Sales orders and Purchase orders, such as &lt;strong&gt;Request change&lt;/strong&gt;, &lt;strong&gt;Purchase order confirmations&lt;/strong&gt;, …&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution: activate configuration key Full feature set&lt;/h3&gt;    &lt;p&gt;Apparently activating &lt;strong&gt;Retail&lt;/strong&gt; limits (to ease user experience) the &lt;strong&gt;Dynamics AX&lt;/strong&gt; client. In case you want to use some &lt;strong&gt;Retail&lt;/strong&gt; features, but you are not in a &lt;strong&gt;Retail&lt;/strong&gt; implementation, checking the &lt;strong&gt;Full feature set configuration key&lt;/strong&gt; brings back all the features of Dynamics AX in the Main menu.&lt;/p&gt;   &lt;img src="https://lh6.googleusercontent.com/-zD87ozNjWXI/VHxvD308FBI/AAAAAAAABnk/C-afKvbNe8E/w346-h462-no/1-12-2014%2B14-28-04.jpg" /&gt;&lt;/img&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/908353471941856308/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/908353471941856308?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/908353471941856308" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/908353471941856308" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2014/12/limited-main-menu-after-activating.html" rel="alternate" title="Limited Main menu after activating Retail configuration key" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://lh6.googleusercontent.com/-zD87ozNjWXI/VHxvD308FBI/AAAAAAAABnk/C-afKvbNe8E/s72-w346-h462-c-no/1-12-2014%2B14-28-04.jpg" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-907911567427625209</id><published>2013-12-03T17:04:00.001+01:00</published><updated>2013-12-03T17:11:08.229+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CIL"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Task Scheduler"/><title type="text">Schedule full CIL compile</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Business requirement: Schedule full CIL compile&lt;/h3&gt;&lt;/span&gt;&lt;p&gt;A full &lt;strong&gt;CIL&lt;/strong&gt; compile can be run from the &lt;strong&gt;AX&lt;/strong&gt; client, but you cannot schedule it. This post describes how to achieve scheduling a full &lt;strong&gt;CIL&lt;/strong&gt; compile recurring using &lt;strong&gt;Task Scheduler&lt;/strong&gt;.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution: step-by-step scheduling with Task Scheduler&lt;/h3&gt;    &lt;p&gt;Open Task Scheduler, create a new folder for your Dynamics AX tasks and choose &lt;strong&gt;Create new Task&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheRa1rdOYPvLhnFFtiPr4u_nHsrhLxmvm87O5wfZLJiFB81oyH5EtNudaTAUd5wz6iGxigjnvm6_c9LqAs0RBLqopH1Hu-uhkrzP4IwHSsGpXk41-aZzPLXtZKLOcU2R9xoX-dUnlfwMfg/w936-h344-no/3-12-2013+16-32-48.jpg" width="500" height="183" /&gt;&lt;/img&gt;&lt;/p&gt;    &lt;p&gt;In the &lt;strong&gt;Triggers&lt;/strong&gt; tab define the recurrence pattern for your task.&lt;/p&gt;    &lt;p&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6aHK6DvwfZca8gl3ER5xzKJkplvPccminCeaR31vGXHECZ2SauvgY3C5lvY8Q897jju-d_vEFYXI2I8erYuk2LR9lun2Nadea-uSAFp2Th18mNM35PufvuhzfSFknb4Im5FOXud9N5Me5/w625-h616-no/3-12-2013+16-48-01.jpg" width="525" height="516" /&gt;&lt;/img&gt;&lt;/p&gt;    &lt;p&gt;In the &lt;strong&gt;Actions&lt;/strong&gt; tab define the task to run, being the full &lt;strong&gt;CIL&lt;/strong&gt; compile.       &lt;br /&gt;In the &lt;strong&gt;Program/script&lt;/strong&gt; field point to your &lt;strong&gt;AX client&lt;/strong&gt;, normally it should be located in &lt;em&gt;&amp;quot;C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe&amp;quot;.&lt;/em&gt;       &lt;br /&gt;As arguments you specify the following:       &lt;br /&gt;&lt;em&gt;-aos2=&amp;lt;AOSServer&amp;gt;:&amp;lt;portnumber&amp;gt; -startupcmd=CompileIl -lazytableloading –lazyclassloading&lt;/em&gt; where you replace &amp;lt;AOSServer&amp;gt; and &amp;lt;portnumber&amp;gt; with your actual AOS and port.&lt;/p&gt;    &lt;p&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31Oi-IkoNdredcSrbEdvMeAK9rvFKkDQJs4_fF5Iy5gOj6QumU-Z1JF8o0wp8UFd3V9uwN3fL9rcUeZp3snKl92ij3qV8g-_WsXwtCCxgj-qYPfcpjO_i3aqyPG2531Rovp-QtdMAXDIg/w802-h481-no/3-12-2013+16-54-26.jpg" width="525" height="315" /&gt;&lt;/img&gt;&lt;/p&gt;    &lt;p&gt;You are done: &lt;strong&gt;CIL&lt;/strong&gt; compile is scheduled to run recurrent, just make sure you have a remote desktop session open to the server where you have scheduled it, so it can kick off at the scheduled time.&lt;/p&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/907911567427625209/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/907911567427625209?isPopup=true" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/907911567427625209" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/907911567427625209" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/12/schedule-full-cil-compile.html" rel="alternate" title="Schedule full CIL compile" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheRa1rdOYPvLhnFFtiPr4u_nHsrhLxmvm87O5wfZLJiFB81oyH5EtNudaTAUd5wz6iGxigjnvm6_c9LqAs0RBLqopH1Hu-uhkrzP4IwHSsGpXk41-aZzPLXtZKLOcU2R9xoX-dUnlfwMfg/s72-w936-h344-c-no/3-12-2013+16-32-48.jpg" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-1606504000833447567</id><published>2013-10-31T15:26:00.000+01:00</published><updated>2013-11-05T15:34:45.519+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BI"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Migration"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Office Add-ins"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Links List October 2013</title><content type="html">&lt;p&gt;I decided to share all my interesting reads and resources month by month with my blog readers. You can find these posts by searching on the label &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt;. I'll try to order the resources in logical categories. If you would like to see some interesting stuff added in the next month, don't hesitate to post a comment.&lt;/p&gt;  &lt;p&gt;So this is my &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt; post for October 2013.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Dynamics AX&lt;/h3&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/6116.dynamics-ax-on-hand-inventory.aspx" target="_blank"&gt;Dynamics AX: On Hand Inventory&lt;/a&gt;: Table describing the information in Items On hand form&lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/axsupport/archive/2013/09/06/troubleshooting-upgrade-and-cu-batch-jobs-stuck-in-a-waiting-status-in-dynamics-ax-2012.aspx" target="_blank"&gt;Troubleshooting Upgrade and CU Batch jobs stuck in a waiting status in Dynamics AX 2012&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://technet.microsoft.com/EN-US/library/hh394894.aspx" target="_blank"&gt;Test Data Transfer Tool (beta) for Microsoft Dynamics AX 2012 [AX 2012]&lt;/a&gt;: The Microsoft Dynamics AX 2012 Test Data Transfer Tool (beta) (DP.exe) is a command-line tool that exports data from a Microsoft Dynamics AX 2012 business database in a production or non-production environment. The tool also imports data into a Microsoft Dynamics AX 2012 business database in a non-production environment. The non-production environment can be either a development or test environment.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://ax2012exceldataimport.blogspot.be/2013/04/dynamics-ax-2012-excel-add-in-issues.html?showComment=1381242079191#c26410438967406952" target="_blank"&gt;Dynamics AX 2012 Excel Add-in - Issues and Solutions (Method UpdateRecIdVisibility not found)&lt;/a&gt;: The purpose of this post is to outline some issues you may encounter when using Dynamics AX 2012 Excel Add-in for import of data and provide solutions to resolve them.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/axsupport/archive/2012/03/29/overview-of-ax-build-numbers.aspx" target="_blank"&gt;Overview of Microsoft Dynamics AX build numbers&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd309683.aspx" target="_blank"&gt;Deploy the default cubes [AX 2012]&lt;/a&gt;: Microsoft Dynamics AX includes a default project for Microsoft SQL Server Analysis Services that you can deploy. This project includes analysis cubes that you can use. You can deploy the project, and the cubes that it contains, by using either the Analysis Services Project Wizard or Windows PowerShell. The procedures explain how to use both methods.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd261526(v=ax.50).aspx" target="_blank"&gt;Walkthrough: Analyzing Cube Data in Excel&lt;/a&gt;: You can analyze data by using Microsoft Office Excel to connect to a Microsoft Dynamics AX OLAP cube.&lt;/li&gt;   &lt;/ul&gt;    &lt;h3&gt;Project Accounting&lt;/h3&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://itprojectfinancials.com/glossary/accruals-2/" target="_blank"&gt;Accruals&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/1606504000833447567/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/1606504000833447567?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1606504000833447567" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1606504000833447567" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/10/links-list-october-2013.html" rel="alternate" title="Links List October 2013" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-6015203363689717965</id><published>2013-07-10T11:27:00.001+02:00</published><updated>2013-07-10T11:30:12.335+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Procurement"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Create item requirements checkbox</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Introduction&lt;/h3&gt;&lt;/span&gt;  &lt;p&gt;There is a really nice new feature from &lt;strong&gt;R2&lt;/strong&gt; onwards in the &lt;strong&gt;Project management and accounting&lt;/strong&gt; module for project purchase orders.&lt;/p&gt;  &lt;p&gt;There is a new checkbox in the &lt;strong&gt;project accounting parameters&lt;/strong&gt;, called &lt;strong&gt;Create item requirements​&lt;/strong&gt;.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Functionality&lt;/h3&gt;  &lt;p&gt;What it does is, when you create a project purchase order, it creates automatically for you a marked item requirement on the project purchase order (and not anymore the annoying virtual inventory transaction which makes upon receipt of the project purchase order, items are consumed immediately on the project).&lt;/p&gt;  &lt;p&gt;Upon receipt of your project purchase order, the popup still comes where you can choose to consume the items immediately, but you don't need to do it. Making it possible to ship actually after receipt of your project purchase order, your goods on a latter moment in time and keep it in between in your warehouse (and probably break the marking and reservation so you can use the bought goods for another more urgent project).&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/6015203363689717965/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/6015203363689717965?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6015203363689717965" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6015203363689717965" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/07/create-item-requirements-checkbox.html" rel="alternate" title="Create item requirements checkbox" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-428111671496602752</id><published>2013-06-28T21:16:00.000+02:00</published><updated>2013-06-28T21:20:39.055+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Project item requirements in AX 2012 R2</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Introduction &lt;/h3&gt;&lt;/span&gt;
&lt;p&gt;Some changes to &lt;strong&gt;project item requirements&lt;/strong&gt; are introduced since &lt;strong&gt;AX 2012 R2&lt;/strong&gt;. &lt;/p&gt;
&lt;span id="fullpost"&gt;&lt;h3&gt;Changes in AX 2012 R2&lt;/h3&gt;&lt;p&gt;The Item requirements form moved from the &lt;strong&gt;Manage&lt;/strong&gt; to the &lt;strong&gt;Plan&lt;/strong&gt; tab in the ribbon. &lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPAEGwXefPxGzRjyetQa5I_1jASUrYBsKGZDWfeVjjwtkgAN15FkCFuTWmOLemM8CaTo0Kept0TuE23Z7E08aoCUy7aKJj_UV7jiSC-0mbFiUpip_6zWN85XdCnO9TWlehL3eNC7oB6Us/s546/28-06-2013+21-13-47.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPAEGwXefPxGzRjyetQa5I_1jASUrYBsKGZDWfeVjjwtkgAN15FkCFuTWmOLemM8CaTo0Kept0TuE23Z7E08aoCUy7aKJj_UV7jiSC-0mbFiUpip_6zWN85XdCnO9TWlehL3eNC7oB6Us/s546/28-06-2013+21-13-47.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;
You can create &lt;strong&gt;Sales orders&lt;/strong&gt; of &lt;strong&gt;Order type Item requirements&lt;/strong&gt;. As consequence, you can create as many Item requirements Sales orders as you want on the same project. Hence you could group your Item requirements based on Delivery date, and also if that group of item requirements changes of Delivery date, you can simply adapt it on the Sales order heading in stead of having to do it Order line by Order line.&lt;br /&gt;
Although you can create Sales orders of Order type Item requirements, you still can’t post the Packing Slip from the Project sales orders form: you still can only book it on the Item requirements form.&lt;/p&gt;&lt;/span&gt;
&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/428111671496602752/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/428111671496602752?isPopup=true" rel="replies" title="12 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/428111671496602752" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/428111671496602752" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/06/project-item-requirements-in-ax-2012-r2.html" rel="alternate" title="Project item requirements in AX 2012 R2" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPAEGwXefPxGzRjyetQa5I_1jASUrYBsKGZDWfeVjjwtkgAN15FkCFuTWmOLemM8CaTo0Kept0TuE23Z7E08aoCUy7aKJj_UV7jiSC-0mbFiUpip_6zWN85XdCnO9TWlehL3eNC7oB6Us/s72-c/28-06-2013+21-13-47.jpg" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-5736317643327947140</id><published>2013-04-02T16:53:00.001+02:00</published><updated>2013-04-02T16:53:39.810+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Inventory Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><category scheme="http://www.blogger.com/atom/ns#" term="Quarantine Orders"/><category scheme="http://www.blogger.com/atom/ns#" term="Supply Chain Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Workflow"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Links List March 2013</title><content type="html">&lt;p&gt;I decided to share all my interesting reads and resources month by month with my blog readers. You can find these posts by searching on the label &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt;. I'll try to order the resources in logical categories. If you would like to see some interesting stuff added in the next month, don't hesitate to post a comment.&lt;/p&gt;  &lt;p&gt;So this is my &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt; post for March 2013.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Dynamics AX&lt;/h3&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://sandeepchaudhury.wordpress.com/2012/11/29/automated-tasks-in-workflows-in-microsoft-dynamics-ax-2012/" target="_blank"&gt;Automated Tasks in Workflow in Microsoft Dynamics AX 2012&lt;/a&gt;: how to configure automated tasks in a &lt;strong&gt;workflow&lt;/strong&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="https://sandeepchaudhury.wordpress.com/2013/03/19/project-invoice-proposal-approvals-in-microsoft-dynamics-ax-2012-r2/" target="_blank"&gt;Project Invoice Proposal Approvals in Microsoft Dynamics AX 2012 R2&lt;/a&gt;: how to enable/disable project invoice proposals workflow &lt;/li&gt;      &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh397320.aspx" target="_blank"&gt;X++ Scenarios that are not supported in CIL&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/dynamicsaxscm/archive/2012/09/28/inventory-blocking.aspx" target="_blank"&gt;Inventory blocking&lt;/a&gt;: how to prevent items currently in a warehouse from being used in standard processes, without using &lt;strong&gt;quarantine orders&lt;/strong&gt;. &lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/dynamicsaxscm/archive/2012/10/05/troubleshooting-the-product-release-process.aspx" target="_blank"&gt;Troubleshooting the product release process&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://fedotenko.info/?page_id=31" target="_blank"&gt;Costing and inventory closing&lt;/a&gt;: Tips on creating item number schemes &lt;/li&gt;      &lt;li&gt;&lt;a href="http://mindbrations.blogspot.com.au/2012/06/ax2012-how-to-control-visibility-of.html" target="_blank"&gt;AX 2012 – How to control the visibility of FactBox on form thru X++&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://daxmusings.codecrib.com/2013/01/fixing-code-caching-on-ax-environment.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+DynamicsAxMusings+%28Dynamics+Ax+Musings%29" target="_blank"&gt;Fixing code caching on AX environment copies&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://es-ax.blogspot.in/2012/02/picking-registration-reservation.html" target="_blank"&gt;Picking, Registration, Reservation, Marking… What’s the difference?&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd638052(v=ax.50).aspx" target="_blank"&gt;How to: Debug X++ Code in Workflow&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;&lt;a href="http://workflowax.wordpress.com" target="_blank"&gt;Dynamics AX Workflow Wanderings&lt;/a&gt;: Hints and Tips for &lt;strong&gt;Dynamics AX&lt;/strong&gt; Workflow &lt;/li&gt;   &lt;/ul&gt;    &lt;h3&gt;Supply Chain Management&lt;/h3&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://www.clearlyinventory.com/inventory-basics/how-to-design-good-item-numbers-for-products-in-inventory" target="_blank"&gt;How to Design Good Item Numbers for Products in Inventory&lt;/a&gt; &lt;/li&gt;   &lt;/ul&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/5736317643327947140/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/5736317643327947140?isPopup=true" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5736317643327947140" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5736317643327947140" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/04/links-list-march-2013.html" rel="alternate" title="Links List March 2013" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-3229629102665750756</id><published>2013-03-25T17:17:00.001+01:00</published><updated>2013-03-25T17:19:42.960+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Intercompany"/><category scheme="http://www.blogger.com/atom/ns#" term="Supply Chain Management"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Add fields for intercompany synchronization</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Business requirement: add fields for intercompany synchronization&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;If you need to synch additional sales line fields upon activation of the &lt;strong&gt;intercompany chain&lt;/strong&gt;, some code modifications have to been executed. In this example the &lt;strong&gt;Customer Reference&lt;/strong&gt; on the salesline needed to be synchronized.(field &lt;strong&gt;CustomerRef&lt;/strong&gt;). End users had to be able to input a different customer reference line by line, not one general customer reference for the sales order as a whole.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution: X++ modifications&lt;/h3&gt;    &lt;p&gt;First of all the field &lt;strong&gt;CustomerRef &lt;/strong&gt;should be set to visible on the salesline, so end users can modify it. The field is already available in the &lt;strong&gt;AOT &lt;/strong&gt;on the &lt;strong&gt;SalesLine &lt;/strong&gt;table, it is only not visible in the form. &lt;/p&gt;    &lt;p&gt;Next, modify the method &lt;strong&gt;interCompanyUpdateNow&lt;/strong&gt; on the &lt;strong&gt;PurchLine&lt;/strong&gt; table: add some code for the new field to be synchronized. &lt;/p&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;...&lt;br /&gt;||  this.orig().ReturnDispositionCodeId     &lt;br /&gt;        != this.ReturnDispositionCodeId&lt;br /&gt;||  this.orig().ReturnStatus                &lt;br /&gt;        != this.ReturnStatus&lt;br /&gt;||  this.orig().MatchingAgreementLine       &lt;br /&gt;        != this.MatchingAgreementLine&lt;br /&gt;// BEGIN&lt;br /&gt;|| this.orig().CustomerRef                  &lt;br /&gt;       != this.CustomerRef&lt;br /&gt;// END&lt;br /&gt;    )&lt;br /&gt;{&lt;br /&gt;    ok = true;&lt;br /&gt;}&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Add a new parm method to the class &lt;strong&gt;AxPurchLine&lt;/strong&gt; for the new field to be synchronized. &lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;public CustRefLine parmCustRefLine(CustRefLine &lt;br /&gt;                             _custRefLine = '')&lt;br /&gt;{&lt;br /&gt;    if (!prmisDefault(_custRefLine))&lt;br /&gt;    {&lt;br /&gt;        this.setField(fieldNum(PurchLine, CustomerRef), &lt;br /&gt;                                          _custRefLine);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return purchLine.CustomerRef;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Add a new parm method to the class &lt;strong&gt;AxSalesLine&lt;/strong&gt; for the new field to be synchronized. &lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;public CustRefLine parmCustRefLine(CustRefLine &lt;br /&gt;                             _custRefLine = '')&lt;br /&gt;{&lt;br /&gt;    if (!prmisDefault(_custRefLine))&lt;br /&gt;    {&lt;br /&gt;        this.setField(fieldNum(SalesLine, CustomerRef), &lt;br /&gt;                                          _custRefLine);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return salesLine.CustomerRef;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Modify the &lt;strong&gt;interCompanyMirror&lt;/strong&gt; method of class &lt;strong&gt;PurchLineType&lt;/strong&gt; so the new field gets synchronized upon creation of changing the purchline. &lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;...&lt;br /&gt;// BEGIN&lt;br /&gt;if (create ||  purchLine.fieldChanged(fieldNum(PurchLine, &lt;br /&gt;                                             CustomerRef)))&lt;br /&gt;    axSalesLine.aduParmCustRefLine(purchLine.CustomerRef);&lt;br /&gt;// END&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Modify the &lt;strong&gt;syncPurchLine&lt;/strong&gt; method of class &lt;strong&gt;SalesLineType&lt;/strong&gt; so the new field gets synchronized upon creation of changing the salesline. &lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;...&lt;br /&gt;// BEGIN&lt;br /&gt;if (create&lt;br /&gt;||  _salesLine.fieldChanged(fieldNum(SalesLine, &lt;br /&gt;                                   CustomerRef)))&lt;br /&gt;    axPurchLine.aduParmCustRefLine(_salesLine.CustomerRef);&lt;br /&gt;// END&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/3229629102665750756/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/3229629102665750756?isPopup=true" rel="replies" title="3 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3229629102665750756" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3229629102665750756" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/03/add-fields-for-intercompany.html" rel="alternate" title="Add fields for intercompany synchronization" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-6270963321116643198</id><published>2013-03-04T13:01:00.001+01:00</published><updated>2013-03-04T13:01:18.200+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Office"/><category scheme="http://www.blogger.com/atom/ns#" term="Word"/><title type="text">Word file generation fails from within Dynamics AX</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Problem description: Word file generation fails&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;Upon generating a &lt;strong&gt;MS Word&lt;/strong&gt; file from within &lt;strong&gt;Dynamics AX&lt;/strong&gt; some cryptic error message is thrown like &lt;em&gt;Method add in COM-object of class Documents returns error code 0x800A1436&lt;/em&gt;.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;p&gt;In &lt;strong&gt;MS Word&lt;/strong&gt; go to &lt;strong&gt;Options &amp;gt; Trust Center &amp;gt; Trust Center Settings &amp;gt; Protected View&lt;/strong&gt; and uncheck &lt;strong&gt;Enable Protected View for files originating from the Internet&lt;/strong&gt;.&lt;/p&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/6270963321116643198/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/6270963321116643198?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6270963321116643198" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6270963321116643198" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/03/word-file-generation-fails-from-within.html" rel="alternate" title="Word file generation fails from within Dynamics AX" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-2010603022071160647</id><published>2013-02-28T17:27:00.001+01:00</published><updated>2013-02-28T17:27:57.476+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Case Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><title type="text">About setting up case e-mail templates</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Introduction&lt;/h3&gt;&lt;/span&gt;  &lt;p&gt;To set up a &lt;strong&gt;case e-mail template&lt;/strong&gt;, first you create a template and then you open the e-mail editor to set up the predefined contents of e-mail messages that are based on the template. &lt;/p&gt;  &lt;p&gt;The predefined contents consist of merge data and links that can be inserted in the template. &lt;/p&gt;  &lt;p&gt;The merge data is a set of data that provides details on the &lt;strong&gt;case&lt;/strong&gt; in the e-mail message.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Merge-data overview&lt;/h3&gt;  &lt;p&gt;The following merge-data elements can be added in the e-mail template. The merge-data elements can be used to inform the user about various aspects of the &lt;strong&gt;case&lt;/strong&gt;. &lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="525"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="203"&gt;&lt;strong&gt;HTML merge-data element&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="320"&gt;&lt;strong&gt;Information displayed in e-mail message&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="205"&gt;%CaseId%&lt;/td&gt;        &lt;td valign="top" width="318"&gt;The identification number assigned to the case&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="207"&gt;%CaseDescription%&lt;/td&gt;        &lt;td valign="top" width="317"&gt;A description of the case&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="208"&gt;%CaseSourceName%&lt;/td&gt;        &lt;td valign="top" width="316"&gt;The name of the party record that the case is created for&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="209"&gt;%CaseMemo%&lt;/td&gt;        &lt;td valign="top" width="315"&gt;Additional notes about the selected&amp;#160; case&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://picasaweb.google.com/lh/photo/vmDBZ7MlxPMwRMSeND73HtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK_Ji8AU-rGn33luTgRVFl8tdS4ERsSyyEDd2syxgcp4jEMJPnbk_WXsaxgziGWNbd3NS1BnYEadcFdehFKvAnwqpTFl0vBQTlFAk3ACM-YeEIgaDCNrPBvSlpHYavulz0gnGsuu8eW4J3/s400/28-02-2013%252016-54-26.jpg" width="400" height="255" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Link the e-mail template to the case category&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;a href="https://picasaweb.google.com/lh/photo/fDya_3AwvFUHWbqegIq-GNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2pPD-eeGzgO9Eom3DD4WpswdUOLipv_WvqMZojAygWkRP5smlBbXpvUugnpkVqxV2jXuY4a-NJOfTXNJjucFTG9_ki3j2NGifdLgtgNXbFyGX5ApEOPUUoIBkVdugdl72qVobCC2g1fTO/s400/28-02-2013%252017-17-26.jpg" width="400" height="129" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Start sending mails from your &lt;strong&gt;Cases&lt;/strong&gt;, some data of the case will be merged into the generated e-mail message.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://picasaweb.google.com/lh/photo/-aXPY2Q23Gp9fNOtg9csu9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRZpN0iQ5BvNYKUR4Xzgub16LMb1ZIugYcDsKy-O-RjGyS4QdnvHpn9vNOEGWM8BaTTmfH8j64GYgRIX3ikc_SEpAcW7eceZNWp9rvboZ9p4SPadFuRhCjTTn_TWfsdQBHo3Njs-2LTgGC/s400/28-02-2013%252017-23-01.jpg" width="400" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/2010603022071160647/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/2010603022071160647?isPopup=true" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2010603022071160647" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2010603022071160647" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/02/about-setting-up-case-e-mail-templates.html" rel="alternate" title="About setting up case e-mail templates" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK_Ji8AU-rGn33luTgRVFl8tdS4ERsSyyEDd2syxgcp4jEMJPnbk_WXsaxgziGWNbd3NS1BnYEadcFdehFKvAnwqpTFl0vBQTlFAk3ACM-YeEIgaDCNrPBvSlpHYavulz0gnGsuu8eW4J3/s72-c/28-02-2013%252016-54-26.jpg" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-5513512881394869489</id><published>2013-01-30T13:28:00.001+01:00</published><updated>2013-01-30T15:12:09.322+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alerts"/><category scheme="http://www.blogger.com/atom/ns#" term="Axapta"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Wrong email displayed for alert rules in Dynamics AX 2009</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Problem description&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;When creating or modifying &lt;strong&gt;alert rules&lt;/strong&gt;, the e-mail shows always the email     &lt;br /&gt;of the current user, in stead of the email of the user for whom the &lt;strong&gt;alert rule&lt;/strong&gt;     &lt;br /&gt;is valid. This problem is fixed in &lt;strong&gt;Dynamics AX 2012&lt;/strong&gt;.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;p&gt;Some &lt;strong&gt;X++&lt;/strong&gt; modifications are needed in two &lt;strong&gt;Forms&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Form&lt;/strong&gt; &lt;em&gt;EventCreateRule&lt;/em&gt;, &lt;strong&gt;method &lt;/strong&gt;&lt;em&gt;modified&lt;/em&gt; on &lt;strong&gt;Field&lt;/strong&gt;&lt;em&gt; EventRule.UserId&lt;/em&gt;:&lt;/p&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;public void modified()&lt;br /&gt;{&lt;br /&gt;  super();&lt;br /&gt;&lt;br /&gt;  // BEGIN&lt;br /&gt;  eventRule_SendEmailAddress.text(&lt;br /&gt;        SysUserInfo::find(EventRule.UserId).Email);&lt;br /&gt;  // END&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;&lt;strong&gt;Form &lt;/strong&gt;&lt;em&gt;EventRule&lt;/em&gt;, &lt;strong&gt;method&lt;/strong&gt; &lt;em&gt;setControlsActive&lt;/em&gt; on &lt;strong&gt;DataSource&lt;/strong&gt; &lt;em&gt;EventRule&lt;/em&gt;:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;...&lt;br /&gt;else if (!canShowPopUpCheckBox)&lt;br /&gt;{&lt;br /&gt;  alertMeBy.visible(true);&lt;br /&gt;  eventRule_ShowPopUp.visible(false);&lt;br /&gt;  eventRule_SendEmail.visible(true);&lt;br /&gt;  eventRule_SendEmailAddress.visible(true);&lt;br /&gt;  // BEGIN&lt;br /&gt;  //eventRule_SendEmailAddress.text(userInfo.Email);&lt;br /&gt;  eventRule_SendEmailAddress.text(&lt;br /&gt;    SysUserInfo::find(EventRule.UserId).Email);&lt;br /&gt;  // END&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;  alertMeBy.visible(true);&lt;br /&gt;  eventRule_ShowPopUp.visible(true);&lt;br /&gt;  eventRule_SendEmail.visible(true);&lt;br /&gt;  eventRule_SendEmailAddress.visible(true);&lt;br /&gt;  // BEGIN&lt;br /&gt;  //eventRule_SendEmailAddress.text(userInfo.Email);&lt;br /&gt;  eventRule_SendEmailAddress.text(&lt;br /&gt;    SysUserInfo::find(EventRule.UserId).Email);&lt;br /&gt;  // END&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (eventRule.UserId == curuserid())&lt;br /&gt;  eventInboxSingleton.enabled(true);&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/5513512881394869489/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/5513512881394869489?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5513512881394869489" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5513512881394869489" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/01/wrong-email-displayed-for-alert-rules.html" rel="alternate" title="Wrong email displayed for alert rules in Dynamics AX 2009" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-5576071654231602288</id><published>2013-01-23T17:24:00.001+01:00</published><updated>2013-01-23T17:25:18.017+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Axapta"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Find method on Temporary tables</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Problem: find method not returning rows on a temporary table&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;Temporary table variables are always newly created, so a static find table method should be written differently compared to regular tables.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;p&gt;To make your find method work, you need to pass through the reference to the temporary table.&lt;/p&gt;   &lt;code class="axapta"&gt;     &lt;pre&gt;public static TmpAvgCubicMeterPrices find(&lt;br /&gt;         ProjId                    _projId,&lt;br /&gt;         InventDimCombinationName  _inventDimCombinationName,&lt;br /&gt;         TmpAvgCubicMeterPrices    _tmpAvgCubicMeterPrices,&lt;br /&gt;         boolean                   _forUpdate = false)&lt;br /&gt;{ &lt;br /&gt;    TmpAvgCubicMeterPrices   tmpAvgCubicMeterPrices; &lt;br /&gt;    ; &lt;br /&gt;&lt;br /&gt;    tmpAvgCubicMeterPrices.setTmpData( &lt;br /&gt;              _tmpAvgCubicMeterPrices);&lt;br /&gt;&lt;br /&gt;    tmpAvgCubicMeterPrices.selectForUpdate(_forUpdate);&lt;br /&gt;&lt;br /&gt;    select firstonly tmpAvgCubicMeterPrices&lt;br /&gt;       where tmpAvgCubicMeterPrices.ProjId&lt;br /&gt;                                                   == _projId  &lt;br /&gt;       &amp;amp;&amp;amp; tmpAvgCubicMeterPrices.InventDimCombinationName&lt;br /&gt;                                == _inventDimCombinationName; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    return tmpAvgCubicMeterPrices; &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;/code&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/5576071654231602288/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/5576071654231602288?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5576071654231602288" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5576071654231602288" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2013/01/find-method-on-temporary-tables.html" rel="alternate" title="Find method on Temporary tables" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-7450623002731591017</id><published>2012-10-11T13:06:00.001+02:00</published><updated>2012-10-11T13:06:38.123+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Unwanted changecompany due to refresh SysOperationProgress class</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Problem: unexpected changecompany&lt;/h3&gt;&lt;/span&gt;  &lt;p&gt;I was faced with a problem in &lt;strong&gt;Dynamics AX 2012&lt;/strong&gt;, where sometimes an unexpected &lt;strong&gt;changecompany&lt;/strong&gt; happened in a process. Sometimes it occurred, sometimes it didn’t, making it difficult to simulate it.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Solution&lt;/h3&gt;  &lt;p&gt;The cause of the problem was the &lt;strong&gt;SysOperationProgress class&lt;/strong&gt;. This &lt;strong&gt;class&lt;/strong&gt; can be used to inform the user about status, operation and progress of the system. It was initiated before my &lt;strong&gt;changecompany&lt;/strong&gt; call and closed after it. When the progress bar created by the &lt;strong&gt;SysOperationProgress class&lt;/strong&gt; was refreshed during code execution within my &lt;strong&gt;changecompany&lt;/strong&gt; class, a call is done by &lt;strong&gt;X++&lt;/strong&gt; to the &lt;strong&gt;Docu&lt;/strong&gt; class. This triggers also a &lt;strong&gt;changecompany&lt;/strong&gt; due my original legal entity. Hence some of my code within my &lt;strong&gt;changecompany&lt;/strong&gt; call was executed in the company to which I did the change, some was done in the company I originated from. And this not all of the time, as it only happened if a refresh happened of my progress bar within the &lt;strong&gt;changecompany&lt;/strong&gt; call. I removed the SysOperationProgress and my problem was solved.&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/7450623002731591017/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/7450623002731591017?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/7450623002731591017" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/7450623002731591017" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/10/unwanted-changecompany-due-to-refresh.html" rel="alternate" title="Unwanted changecompany due to refresh SysOperationProgress class" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-6108158970670691007</id><published>2012-10-10T14:56:00.001+02:00</published><updated>2012-10-10T14:56:46.359+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Create batch job through X++ code</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Business requirement&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;Some flow should execute some code in batch, so you need to add a batch job for the corresponding &lt;strong&gt;RunBaseBatch&lt;/strong&gt; class.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;public static void scheduleBatch()&lt;br /&gt;{&lt;br /&gt;    BatchHeader           batchHeader;&lt;br /&gt;    BatchInfo             localBatchInfo;&lt;br /&gt;    YourRunBaseBatchClass yourRunBaseBatchClass;&lt;br /&gt;    SysRecurrenceData     sysRecurrenceData = &lt;br /&gt;             SysRecurrence::defaultRecurrence();&lt;br /&gt;    ;&lt;br /&gt;&lt;br /&gt;    yourRunBaseBatchClass = &lt;br /&gt;        YourRunBaseBatchClass::construct();&lt;br /&gt;&lt;br /&gt;    // retry 3 times   &lt;br /&gt;    sysRecurrenceData = &lt;br /&gt;        SysRecurrence::setRecurrenceEndAfter(&lt;br /&gt;                        sysRecurrenceData, 3);&lt;br /&gt;    // retry after 1 minute&lt;br /&gt;    sysRecurrenceData = &lt;br /&gt;        SysRecurrence::setRecurrenceUnit(sysRecurrenceData, &lt;br /&gt;                             SysRecurrenceUnit::Minute, 1);&lt;br /&gt;    &lt;br /&gt;    localBatchInfo = yourRunBaseBatchClass.batchinfo();&lt;br /&gt;    localBatchInfo.parmGroupId(&amp;quot;YourBatchGroupId&amp;quot;);&lt;br /&gt;    batchHeader = batchHeader::construct();&lt;br /&gt;    batchHeader.addTask(yourRunBaseBatchClass);&lt;br /&gt;    batchHeader.parmRecurrenceData(sysRecurrenceData);&lt;br /&gt;    batchHeader.save();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/6108158970670691007/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/6108158970670691007?isPopup=true" rel="replies" title="4 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6108158970670691007" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6108158970670691007" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/10/create-batch-job-through-x-code.html" rel="alternate" title="Create batch job through X++ code" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-1280548956748723821</id><published>2012-09-06T20:49:00.001+02:00</published><updated>2012-09-06T21:01:47.155+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Axapta"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Reports"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Change dynamically the sorting or grouping in a Report</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Business requirement&lt;/h3&gt;&lt;/span&gt;  &lt;p&gt;My user wanted to be able to run a &lt;strong&gt;report&lt;/strong&gt; for which the data could be dynamically &lt;strong&gt;grouped&lt;/strong&gt; and &lt;strong&gt;sorted&lt;/strong&gt; depending on some choice the user made upon starting up the report. According to the choice made, some other &lt;strong&gt;Sections&lt;/strong&gt; should appear in between the grouped report data blocks.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Solution&lt;/h3&gt;  &lt;p&gt;Create a new &lt;strong&gt;BaseEnum&lt;/strong&gt;, let’s call it ProjCust, with the different sorting and/or grouping possibilities, for example one to group by &lt;em&gt;ProjId&lt;/em&gt; and one to group by &lt;em&gt;CustAccount&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Create the report Class.&lt;/p&gt;  &lt;p&gt;Define in the &lt;strong&gt;classDeclaration&lt;/strong&gt; a &lt;strong&gt;DialogField&lt;/strong&gt; and variable to handle the different sorting/grouping possibilities for the report.&lt;/p&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;public class TutorialGroupReport_GroupReport &lt;br /&gt;                       extends RunBaseReport  &lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; DialogField&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; dialogReportBy;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ADUProjCustDlvDate&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; reportBy;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;    #localmacro.CurrentList&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; reportBy&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; #endmacro&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the &lt;strong&gt;dialog&lt;/strong&gt; method, the possibilities to sort/group the report data is shown.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public Object dialog()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; DialogRunbase dialog = super();&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; dialog.addGroup(&amp;quot;@SYS1046&amp;quot;);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; dialogReportBy&amp;#160; = &lt;br /&gt;      dialog.addFieldValue(TypeId(ProjCust), &lt;br /&gt;                                   reportBy, &lt;br /&gt;                                &amp;quot;@SYS55014&amp;quot;);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; return dialog; &lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/code&gt;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;In the getFromDialog method, store the sorting/grouping option chosen by the end user&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public boolean getFromDialog()  &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; reportBy&amp;#160;&amp;#160;&amp;#160; = dialogReportBy.value();&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return super ();  &lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create a method to return the option chosen by the end user.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;ProjCust reportBy()  &lt;br /&gt;{  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return reportBy;   &lt;br /&gt;}&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/code&gt;&lt;/p&gt;&lt;/pre&gt;&lt;p&gt;Create an updateQuery method, which will adapt dynamically the report Query based on the option chosen by the end user&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public Query updateQuery()  &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Query&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; query;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; QueryBuildDataSource&amp;#160;&amp;#160;&amp;#160; queryBuildDataSource; &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; QueryBuildRange&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; queryBuildRange;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; query = queryRun.query(); &lt;br /&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; queryBuildDataSource = &lt;br /&gt;             query.dataSourceTable(tableNum(ProjTable));&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; switch (this.reportBy())   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; case ProjCust::ProjId:   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; queryBuildDataSource.addSortField(&lt;br /&gt;                            fieldNum(ProjTable,ProjId)); &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; case ProjCust::CustAccount: &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; queryBuildDataSource.addSortField(&lt;br /&gt;                       fieldNum(ProjTable,CustAccount));   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; queryBuildDataSource.addSortField(&lt;br /&gt;                            fieldNum(ProjTable,ProjId)); &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; default:&amp;#160;&amp;#160;&amp;#160; // In default, error. &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw error(strFmt(&amp;quot;@SYS27147&amp;quot;, &lt;br /&gt;                         this.toString()));  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return query;   &lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Call the &lt;strong&gt;updateQuery&lt;/strong&gt; method in the &lt;strong&gt;run&lt;/strong&gt; method.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class="axapta"&gt;void run()  &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; this.updateQuery();&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super();   &lt;br /&gt;}&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Add the other appropriate &lt;strong&gt;methods&lt;/strong&gt; to the &lt;strong&gt;class&lt;/strong&gt;, such as a &lt;strong&gt;lastValueElementName&lt;/strong&gt;, &lt;strong&gt;pack&lt;/strong&gt;, &lt;strong&gt;unpack&lt;/strong&gt;, &lt;strong&gt;description&lt;/strong&gt; and &lt;strong&gt;main&lt;/strong&gt; &lt;strong&gt;method&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Create the Report and the Design of it.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Add your report &lt;strong&gt;Class&lt;/strong&gt; and the report &lt;strong&gt;DataSource&lt;/strong&gt; to be grouped/sorted dynamically as variable the &lt;strong&gt;classDeclaration&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public class ReportRun extends ObjectRun  &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TutorialGroupReport_GroupReport tutorial_GroupReport;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProjTable&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; projTable; &lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Assign the &lt;strong&gt;caller&lt;/strong&gt; to the report &lt;strong&gt;Class&lt;/strong&gt; variable in the &lt;strong&gt;init method&lt;/strong&gt;.&lt;/p&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public void init()   &lt;br /&gt;{&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; super();&lt;/p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tutorial_GroupReport = element.args().caller(); &lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In the fetch method you can change the sorting/grouping dynamically based on the choice of the end user and if necessary add additional design stuff.&lt;/p&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public boolean fetch() &lt;br /&gt;&lt;br /&gt;{   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; QueryRun&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; queryRunProjTable; &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ProjId&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; parentProjId;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CustAccount&amp;#160;&amp;#160;&amp;#160;&amp;#160; custAccount; &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;&lt;br /&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; queryRunProjTable = new QueryRun(&lt;br /&gt;                tutorial_GroupReport.updateQuery()); &lt;br /&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; this.queryRun(queryRunProjTable);&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; while (queryRunProjTable.next()) &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; projTable = queryRunProjTable.get(&lt;br /&gt;                               tableNum(ProjTable)); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; switch (tutorial_GroupReport.reportBy())   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; case ProjCust::ProjId:   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (projTable.ParentId != parentProjId) &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.execute(1);   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; parentProjId = projTable.ParentId; &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; case ProjCust::CustAccount: &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (projTable.CustAccount != custAccount)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.execute(2); &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; custAccount = projTable.CustAccount;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break; &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; default:&amp;#160;&amp;#160;&amp;#160; // In default, error.   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw error(strFmt(&amp;quot;@SYS27147&amp;quot;, &lt;br /&gt;                             this.toString())); &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;p&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.send(projTable);   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return true;   &lt;br /&gt;}&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/1280548956748723821/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/1280548956748723821?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1280548956748723821" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1280548956748723821" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/09/change-dynamically-sorting-or-grouping.html" rel="alternate" title="Change dynamically the sorting or grouping in a Report" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-7851095674670999020</id><published>2012-08-28T16:15:00.000+02:00</published><updated>2012-08-29T16:17:05.445+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Accounts Receivable"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sales and Marketing"/><category scheme="http://www.blogger.com/atom/ns#" term="Trade Agreement Evaluation"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Enable trade agreement evaluation on new SalesLine fields</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Business requirement: show overwrite prices and discounts dialog for new SalesLine field&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;If you add a new field to the &lt;em&gt;SalesLine&lt;/em&gt; or &lt;em&gt;SalesQuotationLine&lt;/em&gt; table, and this field is important for trade agreement evaluations, you should add some code for this field, to enable the &lt;strong&gt;Trade Agreement Evaluation&lt;/strong&gt; functionality. Else, the dialog asking to &lt;strong&gt;Overwrite Prices And Discounts&lt;/strong&gt; won’t appear upon changing this new field.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/fM0cmnfGolLi0dxknfcLWdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-1eNIU9WBcaOpOCQ86OP-E19Rl4Zk0vwN9eU2WWPo40hqpge4ZNKHHrZJZGbP_ZLv2Nm_29BEK3bh2uunD0dxll2cKvwJ_2AdwcrIPDvibsynMPI6tCJTzIgvQyVoX_esdrX7rQaoN_oQ/s400/29-08-2012%252015-54-57.jpg" width="400" height="263" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;p&gt;Add the new field to the Map &lt;em&gt;PriceDiscResultFields&lt;/em&gt; and configure the necessary Mappings with the &lt;em&gt;SalesLine&lt;/em&gt; and or &lt;em&gt;SalesQuotationLine&lt;/em&gt; table.&lt;/p&gt;    &lt;p&gt;In method isTriggerFieldChanged from Map &lt;em&gt;PriceDiscResultFields&lt;/em&gt;, add following code for your new field:&lt;/p&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;…&lt;br /&gt;boolean lineFieldChanged() &lt;br /&gt;{  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return _priceDiscResultFields.SalesPurchQty&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;             != priceDiscResultFieldsOrig.SalesPurchQty&lt;br /&gt;           || _priceDiscResultFields.SalesPurchUnit&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;             != priceDiscResultFieldsOrig.SalesPurchUnit&lt;br /&gt;           || _priceDiscResultFields.CurrencyCode&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;             != priceDiscResultFieldsOrig.CurrencyCode&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; || _priceDiscResultFields.RecieptDeliveryDate&lt;br /&gt;             != priceDiscResultFieldsOrig.RecieptDeliveryDate  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; || _priceDiscResultFields.Price&lt;br /&gt;             != priceDiscResultFieldsOrig.Price&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // BEGIN&lt;br /&gt;           || _priceDiscResultFields.YourNewField &lt;br /&gt;             != priceDiscResultFieldsOrig.YourNewField;&lt;br /&gt;          // END  &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;In Class &lt;em&gt;SalesLineType&lt;/em&gt;, method &lt;em&gt;validateField&lt;/em&gt;, add following code:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;// BEGIN&lt;br /&gt;&lt;br /&gt;case fieldNum(SalesLine, YourNewField):&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ok = salesLine.runPriceDiscPolicyDialog();&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; break;&lt;br /&gt;&lt;br /&gt;// END &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/7851095674670999020/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/7851095674670999020?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/7851095674670999020" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/7851095674670999020" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/08/enable-trade-agreement-evaluation-on.html" rel="alternate" title="Enable trade agreement evaluation on new SalesLine fields" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-1eNIU9WBcaOpOCQ86OP-E19Rl4Zk0vwN9eU2WWPo40hqpge4ZNKHHrZJZGbP_ZLv2Nm_29BEK3bh2uunD0dxll2cKvwJ_2AdwcrIPDvibsynMPI6tCJTzIgvQyVoX_esdrX7rQaoN_oQ/s72-c/29-08-2012%252015-54-57.jpg" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-2891137045686715867</id><published>2012-02-29T17:56:00.000+01:00</published><updated>2012-03-04T17:57:46.544+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Freeware"/><category scheme="http://www.blogger.com/atom/ns#" term="Links"/><category scheme="http://www.blogger.com/atom/ns#" term="Shipment"/><category scheme="http://www.blogger.com/atom/ns#" term="Supply Chain Management"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type="text">Links List February 2012</title><content type="html">&lt;p&gt;I decided to share all my interesting reads and resources month by month with my blog readers. You can find these posts by searching on the label &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt;. I'll try to order the resources in logical categories. If you would like to see some interesting stuff added in the next month, don't hesitate to post a comment.&lt;/p&gt;  &lt;p&gt;So this is my &lt;a href="http://patrikluca.blogspot.com/search/label/Links"&gt;Links&lt;/a&gt; post for February 2012.&lt;span id="fullpost"&gt;&lt;/span&gt;  &lt;span id="fullpost"&gt;  &lt;h3&gt;Dynamics AX&lt;/h3&gt;        &lt;ul&gt;     &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/palle_agermark/archive/2007/04/24/what-is-mst.aspx" target="_blank"&gt;What is MST?&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://daxline.blogspot.com/2011/09/form-templates-in-dynamics-ax-2012.html" target="_blank"&gt;Form templates in Dynamics AX 2012&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.doens.be/2011/12/ax-2012-editor-improvements/" target="_blank"&gt;Ax 2012 Editor improvements&lt;/a&gt;: Tips and tricks for the new &lt;strong&gt;X++&lt;/strong&gt; editor in &lt;strong&gt;AX 2012&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/palle_agermark/archive/2007/06/19/how-to-disable-a-configuration-key-from-x.aspx" target="_blank"&gt;How to disable a configuration key from X++&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://www.dynamicsaxtraining.com/dynamics-ax-trade-and-logistics-training/shipment" target="_blank"&gt;Shipment process&lt;/a&gt;: tutorial about the shipment process.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/dynamicsaxscm/archive/2009/04/06/wms-in-microsoft-dynamics-ax-2009-shipping-process-overview.aspx" target="_blank"&gt;WMS in Microsoft Dynamics AX 2009. Shipping Process Overview&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://sandeepchaudhury.wordpress.com/" target="_blank"&gt;A blog on Microsoft Dynamics AX by Sandeep Chaudhury&lt;/a&gt;: great blog with tips and tricks for implementing &lt;strong&gt;Dynamics AX&lt;/strong&gt; in the &lt;strong&gt;services industry&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msdax.blogspot.com/2011/05/how-to-open-exe-from-dynamics-ax.html" target="_blank"&gt;How to open an exe from Dynamics AX&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;h3&gt;Freeware&lt;/h3&gt;        &lt;ul&gt;     &lt;li&gt;&lt;a href="http://mp3gain.sourceforge.net/index.php" target="_blank"&gt;MP3GAIN&lt;/a&gt;: MP3Gain analyzes and adjusts mp3 files so that they have the same volume.&lt;/li&gt;   &lt;/ul&gt;&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/2891137045686715867/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/2891137045686715867?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2891137045686715867" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2891137045686715867" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/02/links-list-february-2012.html" rel="alternate" title="Links List February 2012" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-3126608028329918131</id><published>2012-01-17T10:40:00.001+01:00</published><updated>2012-01-17T10:40:45.527+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Accounts Receivable"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><title type="text">Where is the Quantity tab on the Sales order form in AX 2012?</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Problem description&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;You may be searching for the Quantity tab on the Sales order form in Dynamics AX 2012 where you can find stuff like the Quantity Delivered, Invoiced, … for each sales line of the sales order, and not able to find it. It has been moved a bit in the &lt;strong&gt;AX 2012&lt;/strong&gt; release.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution&lt;/h3&gt;    &lt;p&gt;You can find it by selecting the &lt;strong&gt;General&lt;/strong&gt; tab in the ribbon and choose &lt;strong&gt;Line quantity&lt;/strong&gt;: a new form will open, having similar information with the previous &lt;strong&gt;AX&lt;/strong&gt; versions.&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/lSgnQ1ynZRlc-c1uwOp-otMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP120kxak-fdNy1ogzF7ekRFYIYoFz35pobPjU8Frk_UdK1cgoq1ba4ztlpdZ7VePYxE11gbcC5UYvtkA5q0mxaMBnzJzC330A0TK5ZZNQ0WkCXU2mgkYAMxzRDiYwwvp2NufkfqhuPwGw/s400/17-01-2012%25252010-34-35.jpg" width="400" height="169" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/3126608028329918131/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/3126608028329918131?isPopup=true" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3126608028329918131" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/3126608028329918131" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/01/where-is-quantity-tab-on-sales-order.html" rel="alternate" title="Where is the Quantity tab on the Sales order form in AX 2012?" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP120kxak-fdNy1ogzF7ekRFYIYoFz35pobPjU8Frk_UdK1cgoq1ba4ztlpdZ7VePYxE11gbcC5UYvtkA5q0mxaMBnzJzC330A0TK5ZZNQ0WkCXU2mgkYAMxzRDiYwwvp2NufkfqhuPwGw/s72-c/17-01-2012%25252010-34-35.jpg" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-1698533989469134083</id><published>2012-01-16T11:06:00.003+01:00</published><updated>2012-01-17T21:07:21.109+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Office"/><category scheme="http://www.blogger.com/atom/ns#" term="Office Add-ins"/><category scheme="http://www.blogger.com/atom/ns#" term="Word"/><title type="text">Dynamics AX 2012 Office Add-ins</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Introduction&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;In this post, I explain the different steps to generate a document using a &lt;strong&gt;Word&lt;/strong&gt; template and the &lt;strong&gt;Office Add-ins&lt;/strong&gt; for &lt;strong&gt;Dynamics AX 2012&lt;/strong&gt;.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Publish data sources&lt;/h3&gt;    &lt;p&gt;You need the define which data sources from &lt;strong&gt;Dynamics AX&lt;/strong&gt;, users are allowed to use in &lt;strong&gt;Office&lt;/strong&gt;.&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;Go to &lt;strong&gt;Organization administration &amp;gt; Setup &amp;gt; Document management &amp;gt; Document data sources&lt;/strong&gt;. &lt;/li&gt;      &lt;li&gt;Add the data source you want to use. &lt;/li&gt;      &lt;li&gt;Activate the data source by using the &lt;strong&gt;Activate&lt;/strong&gt; button. &lt;/li&gt;   &lt;/ol&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/Aznc-hN1-b7pTr-rjRYhxtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjddHZ05MRFWr7c_Ip13PUVD9VBEHex-Q2DisPQNvZHtK1yYbIkkH-uOYCTYaYjGDDo_Gr3deIO-Pi6vz2BLNa0_ymV6GuMzd7Wni_yBr7HsgMByX-X9KTOphyL_nj5-5dwj90WEMw_JpdV/s400/16-01-2012%25252011-17-33.jpg" width="400" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;h3&gt;Connecting to the AOS&lt;/h3&gt;    &lt;p&gt;Next, you need to define where to fetch the data from in Word, it is from which &lt;strong&gt;AOS&lt;/strong&gt;. If there are multiple AOS instances, like for example a test, development, … environment, follow these steps:&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;Open &lt;strong&gt;Word&lt;/strong&gt;, go to the &lt;strong&gt;Dynamics AX&lt;/strong&gt; tab and click the &lt;strong&gt;Connection&lt;/strong&gt; button. Open the &lt;strong&gt;Advanced&lt;/strong&gt; section and fill out the &lt;strong&gt;Server&lt;/strong&gt; and &lt;strong&gt;Port&lt;/strong&gt;. &lt;/li&gt;      &lt;li&gt;Choose the &lt;strong&gt;Legal Entity&lt;/strong&gt; from which data should be retrieved. &lt;/li&gt;   &lt;/ol&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/w2OOvonmiQfFGCPaxwQtudMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw7hs71uhpHEXQsBCOdHMHRz8LtMZxV-MOEgbVNn-CzngRkGvKWK7c5ZAm5YMNk3ozhPv2mEJ5e4BStmzqfiqOI3pyaxxvapFn9GQJRps6I6Ia5GfP9qwQhX5_eQYpJK3OLAcNGgIImUfS/s400/16-01-2012%25252010-57-11.jpg" width="400" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;If you don’t know the Server and&amp;#160; Port name, just find the configuration file you are using to start up Dynamics AX. Open it with Notepad and look for following information: &lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/enUdLrLMmqq6tfuqzdvugtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwiwUtScxEEHDzOdz1GHEaNcmZsp1C-NTiHxdBQsCg0qiu4Rojqx1zpJ657bKY3At__FIjC1gd8SlOLA0KdSF9CPeMuCTesu84rL-Dkz6QwMpSXZXQ6EAXChh1uW_40wExgxVG7G2LznHU/s400/16-01-2012%25252011-02-46.jpg" width="400" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Remark 1= after the @ sign, you can find the AOS instance name. Remark 2 = the Port, so don’t fill out the Port you find after the : sign on the aos2 lign.&lt;/p&gt;    &lt;h3&gt;Design the Word document&lt;/h3&gt;    &lt;p&gt;In this example I’ll add a table to my &lt;strong&gt;Word&lt;/strong&gt; document for repeating values of my &lt;em&gt;ProjEmplTransQuery&lt;/em&gt; data source, to show hour transactions for a Project.&lt;/p&gt;    &lt;p&gt;Next, go to the &lt;strong&gt;Dynamics AX&lt;/strong&gt; tab and choose &lt;strong&gt;Add Data&lt;/strong&gt;. Select the &lt;em&gt;ProjEmplTransQuery&lt;/em&gt; data source and hit &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/okL3ZKDbXD-uAulODUsupNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibH8pJicwD3MOzX_TzMaI23EXPcoshPVy6_i-B0gyK1ubrCl7OkVXVvhfuG9VBWTCeHluBsdA3Fi0grCmcAz9bl5yAPOi8tUOkAuthX7px4MmIw5-6C5WtXLCEMNrGHw1RmwdZUGE4bmFr/s400/16-01-2012%25252021-29-19.jpg" width="400" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;To the right, you’ll notice the fields of the chosen data source. As you can notice, if you add related tables to your data source, you can pick fields from multiple tables. Drag and drop the fields you want in your report in the columns of the &lt;strong&gt;Word&lt;/strong&gt; table. If you drop them in the second row, automatically a header row will be created.&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/jqNHcK4bkZsO24pOIpSr9NMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkYKL5o_D-JlKjkwdXFUbDoxhRYxW12rcbCd98hXm75nK2EeP6jOAp6vhAMEBM40HeoiOQTCuR8L3Mp66P2O5varqVGxQ-3sLX6SHr_0qr_zdEe0flhFwKI-uLdlFLe7ziuj2NcZ8tU7ho/s400/16-01-2012%25252021-36-00.jpg" width="400" height="201" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;You can add whatever Word formatting style you like to your table, to make it look nice.&lt;/p&gt;    &lt;p&gt;Maybe it would be great to add a filter to the retrieved data, for example only for a specific project number:&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;Go to the &lt;strong&gt;Dynamics AX&lt;/strong&gt; tab. &lt;/li&gt;      &lt;li&gt;Choose &lt;strong&gt;Filter&lt;/strong&gt;. &lt;/li&gt;      &lt;li&gt;Add the appropriate filters. &lt;/li&gt;   &lt;/ol&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/d4uofILmgCLzNDdewOT6qNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-ZOP15IRm9xR3oDcaRx_mY8X09EKGetrbwrIs_K-b6iQdwbB48K7Kwueu_nWSjoIcGquENtGodOIi3BCgGWUi0DwCsSOkahApJq938NHphmmV9G1kl2raOhELiBZMDPzT8MVVwDzCvfr/s400/16-01-2012%25252021-43-36.jpg" width="400" height="200" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Next, save the &lt;strong&gt;Word&lt;/strong&gt; document.&lt;/p&gt;    &lt;h3&gt;Generating the report&lt;/h3&gt;    &lt;ol&gt;     &lt;li&gt;Open the saved &lt;strong&gt;Word&lt;/strong&gt; document. &lt;/li&gt;      &lt;li&gt;Go to the &lt;strong&gt;Dynamics AX&lt;/strong&gt; tab. &lt;/li&gt;      &lt;li&gt;Choose &lt;strong&gt;Merge Document&lt;/strong&gt;. &lt;/li&gt;   &lt;/ol&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/17mY10VmfHddgIMIgJQ4stMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUzw-Oz_ZYjqto2iltebwhHnZxK7o-GRx_x1CLDH9Ko_S1JIGjB45rK6fwlNV4pwDzPUIykkuqT1dGqZGk4t-ZiNuWd8LUME-0MVx_Zd3r83k8pGe09iUWYL9wLkWf66CmVO00wApjyZg7/s400/16-01-2012%25252021-47-17.jpg" width="400" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;h3&gt;Adding additional data&lt;/h3&gt;    &lt;p&gt;Another data source could be connected to the same Word document. In my example below, I’ve added the &lt;em&gt;ProjTable&lt;/em&gt; data source. I use this data source to put some fields on my report, so no repeating table. To make sure, the fields are filtered the same way my rows in my table are (for the same project), I should add the same filter to my second data source:&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/NijVgv-6JBtuwveaX27botMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhotJcwJE24bQJle74CqhyRP9ALwMvjwWO-lJbhmFclOMFPCxPpeQ13P2Fd_KQG4fmQtHio1-E1A0aG2UdnyGwG9Lz260jiouNeZoxi9YtGEjYw4RgkdtthPPcHI0Orf5EACpEfAHP2UGej/s400/16-01-2012%25252021-57-46.jpg" width="400" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Rerun the report:&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/szZ5ddF6OtODUIM0VQX4jdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1TB3DY29AHdFxyZ8JmJK093R_y_kGWq7wd3_gT1QSIt7hA9-F3VPWf-Qr_EAaU7J-xZN3uVlj25pjLtj_RzMlyWp70QPN3xxw9dNOChoGfTbvc6MHauR1IreM9IEXcfQhYuWDA-a775kC/s400/16-01-2012%25252022-01-16.jpg" width="400" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;A remark: apparently, fields added a such to the Header or Footer of a Word document aren’t replaced by the Merge action. Just a pity, but apparently it ain’t working…&lt;/p&gt;    &lt;h3&gt;Add the Word template to Dynamics AX&lt;/h3&gt;    &lt;ol&gt;     &lt;li&gt;Remove the Filter from the Word document and save it. &lt;/li&gt;      &lt;li&gt;Upload your Word document to a &lt;strong&gt;SharePoint&lt;/strong&gt; library. &lt;/li&gt;      &lt;li&gt;Go to &lt;strong&gt;Organization administration &amp;gt; Setup &amp;gt; Document management &amp;gt; Document types&lt;/strong&gt;. Create a new &lt;strong&gt;Type&lt;/strong&gt; and choose as &lt;strong&gt;Class&lt;/strong&gt; &lt;strong&gt;Template library&lt;/strong&gt;. Fill out the url of the &lt;strong&gt;SharePoint&lt;/strong&gt; library to which you’ve uploaded the Word template in the field &lt;strong&gt;Document library&lt;/strong&gt;. Activate it. &lt;/li&gt;   &lt;/ol&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/HnzATBxJExVLzmhorX4OYtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi679ZvSxrfOhB0ZGtFsB52Y9FCyeKbQBL2xQ_-B6vVgUJs0VBzcnJG9mzl74rkeLbhZ-dQT5XbpK9vQ5dmEtrHA8GOB20G1Ff4GfR2A1USQ7lCOyjt31zp3-4Bc3cUce0MvTf6SYdSs-RL/s400/17-01-2012%25252017-01-02.jpg" width="400" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Once activated, each form containing a reference to the &lt;strong&gt;Primary table&lt;/strong&gt;, will be able to generate the document. This is a problem as our &lt;strong&gt;Primary table&lt;/strong&gt; currently is the &lt;em&gt;ProjEmplTrans&lt;/em&gt; table. However, the &lt;em&gt;ProjTable&lt;/em&gt; was included in our document aswell, so I would like to make this the Primary table. To do so, open the Word document, right click the &lt;em&gt;ProjTable&lt;/em&gt; node, choose &lt;strong&gt;Properties&lt;/strong&gt; and check the &lt;strong&gt;Use as primary query&lt;/strong&gt; checkbox.&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/svwdPwE9AyJP00TzGn8CJ9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tteN5EUiEcOFspcl3eD7oR5wrEp0JYFUnIF8eLucd6wzQbyIcX7icu001e2NkeweVFenKryBtHCow5H8HvIS4weweF0KkgAp4e7RVLDY21N6RpFdndLxoJp6_bwTyU3CVpO5fsyx5-v-/s400/17-01-2012%25252017-09-27.jpg" width="400" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Remove the ProjEmplTransQuery anyway: it won’t filter on Project-Id as it ain’t the primary query.&lt;/p&gt;    &lt;p&gt;Re-upload your &lt;strong&gt;Word&lt;/strong&gt; document to the &lt;strong&gt;SharePoint&lt;/strong&gt; library and &lt;strong&gt;Synchronize&lt;/strong&gt; the &lt;strong&gt;Document Type&lt;/strong&gt; in &lt;strong&gt;AX&lt;/strong&gt; with the library. Now the Primary table is ProjTable for this Word document.&lt;/p&gt;    &lt;h3&gt;Add the generate from template buttons&lt;/h3&gt;    &lt;p&gt;To be able to generate the document, some buttons should be added. The &lt;em&gt;CustTable&lt;/em&gt; form has already the necessary buttons, so it is easiest to just copy it from there and paste it to your target form, in this example the ProjTable form:&lt;/p&gt;    &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/zJ2I6x_MSrDo7-Tp00ughNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQeWVRWZav3mpz1JW9r7cTc7VZ_GlSqU3egbI28R8q2H2QWfgFNKPS2cHnkLUTUDdUgmGY-092OFgOBhv-a094OIsgHjm30XfNssoJIEo7e-g57TlfYE-XcaycnfyXqP8U1VWkZkDpU3Ns/s400/17-01-2012%25252020-48-14.jpg" width="400" height="384" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Some methods should be added on your target form, being &lt;strong&gt;classDeclaration&lt;/strong&gt;:&lt;/p&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;// classDeclaration &lt;br /&gt;class FormRun extends ObjectRun  &lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; …  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // BGN Office Add-ins&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; boolean isDocuActionTemplate;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // END Office Add-ins&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;strong&gt;init&lt;/strong&gt; method:&lt;/p&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;void init()  &lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; …  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; super()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // BGN Office Add-ins  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; isDocuActionTemplate = &lt;br /&gt;        DocuActionForTemplate::createTemplateOnMenuButton(&lt;br /&gt;                    mbTemplatesButton, projTable.TableId); &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; …&lt;br /&gt;    // END Office Add-ins&lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;strong&gt;run&lt;/strong&gt; method:&lt;/p&gt;&lt;pre&gt;&lt;code class="axapta"&gt;public void run()&lt;br /&gt;{&lt;br /&gt;    …&lt;br /&gt;    docuActionTemplateUndefined.visible(&lt;br /&gt;                 !isDocuActionTemplate);&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;&lt;/code&gt;&amp;#160;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Now we can generate the document with as Filter the Project Id from the record selected in the Form. The document is generated and automatically attached to the record in the form:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/cYXRzXi2aa-QRcOZr1myA9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhukpROT3NccC9VU6WJfWE-Nrh2TiKYuihKXh8pLrulV2j-LT8s_9TExVPfri5kAgtGtLQr9x3e26LIxIXoSc_B6OD5hw-lt9UmyUMTZho3mKWHh_P8yT5U7plh0l_xpowaIrrYvX41MFMd/s400/17-01-2012%25252020-59-10.jpg" width="400" height="159" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/ZyrzZkg3y9_2xrOGCY1qUdMTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSXPN3DXaaQ3vTkg49yfu7_jGx23pI3F5svyCJpDfddfWYCQE33O5to8Hxv2Tk06_p5sRyGwr1Js7bRHgxG1JSwzlefW0WMv44cEoxxjN2Dz08d7MLaTXtR_AGnoSCq7hkAd6H3ro_CBeH/s400/17-01-2012%25252021-01-00.jpg" width="400" height="185" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/1698533989469134083/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/1698533989469134083?isPopup=true" rel="replies" title="14 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1698533989469134083" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1698533989469134083" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/01/dynamics-ax-2012-office-add-ins.html" rel="alternate" title="Dynamics AX 2012 Office Add-ins" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjddHZ05MRFWr7c_Ip13PUVD9VBEHex-Q2DisPQNvZHtK1yYbIkkH-uOYCTYaYjGDDo_Gr3deIO-Pi6vz2BLNa0_ymV6GuMzd7Wni_yBr7HsgMByX-X9KTOphyL_nj5-5dwj90WEMw_JpdV/s72-c/16-01-2012%25252011-17-33.jpg" width="72"/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-5977473266527486899</id><published>2012-01-13T08:57:00.001+01:00</published><updated>2012-01-13T08:57:57.224+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Intercompany"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Intercompany timesheets</title><content type="html">&lt;p&gt;Finally, entering&amp;#160; hours on a project in another legal entity will become possible in &lt;strong&gt;Dynamics AX 2012&lt;/strong&gt;, according to a &lt;a href="http://technet.microsoft.com/en-us/library/hh597266.aspx" target="_blank"&gt;Technet article&lt;/a&gt;.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;p&gt;I haven’t tried it yet, but it sounds great: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The intercompany timesheet feature in Microsoft Dynamics AX makes it possible for a worker who is employed by one legal entity to enter timesheet hours for work performed on projects in a different legal entity, without having to be employed by the legal entity that is managing the project. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The legal entity that employs the worker is called the loaning legal entity. The legal entity that manages the project for which the worker contributes hours is called the borrowing legal entity. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;In addition to a cost price, which the loaning legal entity incurs by using the worker, and the sales price, which the customer pays the borrowing legal entity, the intercompany timesheet feature includes a transfer price, which is the amount that the borrowing legal entity pays to the loaning legal entity for the use of its worker.&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/5977473266527486899/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/5977473266527486899?isPopup=true" rel="replies" title="3 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5977473266527486899" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/5977473266527486899" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/01/intercompany-timesheets.html" rel="alternate" title="Intercompany timesheets" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-1733643130206451264</id><published>2012-01-09T14:18:00.001+01:00</published><updated>2012-01-09T14:18:29.224+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">About registering item consumption on projects</title><content type="html">&lt;p&gt;There is a nice &lt;a href="http://technet.microsoft.com/en-us/library/aa571173.aspx" target="_blank"&gt;Technet article&lt;/a&gt;, describing the different ways of consuming item in the Project management and accounting module. I would like to extend it a bit further with this post, elaborating further the differences between all those ways.&lt;/p&gt;  &lt;p align='center'&gt;&lt;a href="https://picasaweb.google.com/lh/photo/0JwxZ15fOEqJOwNVJZIo99MTjNZETYmyPJy0liipFm0?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQgXgf4F8n83i_Kq02LyjN0z21TYL1Nr6UegF0DsKE4pEKGTRbpiMo5X7StndKDFnfnnvJCrxCYVrxTjYKPg09lSwFm00fkqMTZG1gP08B1Gnca_uqxKgRCAuQ0s2VFDVnzWpKTwZW6HWV/s400/20120109.jpg" height="274" width="400" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;span id='fullpost'&gt;&lt;h3&gt;Method 1: Project sales order&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Item transactions are consumed when the customer project invoice is posted.&lt;/li&gt;    &lt;li&gt;Always billable to the customer, no possibility to set it to non chargeable.&lt;/li&gt;    &lt;li&gt;Possibility of partial deliveries.&lt;/li&gt;    &lt;li&gt;Only possible for time and material projects.&lt;/li&gt;    &lt;li&gt;Missellaneous charges functionality available.&lt;/li&gt;    &lt;li&gt;Discount functionality with trade agreements available.&lt;/li&gt;    &lt;li&gt;Planned issue, so net requirements will decrease upon posting the consumption.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Method 2: Inventory journal&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Item transactions are consumed when the journal is posted.&lt;/li&gt;    &lt;li&gt;Possible to set it as non chargeable, hence not invoicing it to the customer.&lt;/li&gt;    &lt;li&gt;Partial deliveries not possible.&lt;/li&gt;    &lt;li&gt;Possible for all project types.&lt;/li&gt;    &lt;li&gt;Missellaneous charges functionality not available.&lt;/li&gt;    &lt;li&gt;Discount functionality with trade agreements not available.&lt;/li&gt;    &lt;li&gt;Unplanned issue, so net requirements will not decrease upon posting the consumption.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Method 3: Project item requirement&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Item transactions are consumed when the packing slip is updated.&lt;/li&gt;    &lt;li&gt;Possible to set it as non chargeable, hence not invoicing it to the customer.&lt;/li&gt;    &lt;li&gt;Possibility of partial deliveries.&lt;/li&gt;    &lt;li&gt;Possible for fixed-price and time and material projects.&lt;/li&gt;    &lt;li&gt;Missellaneous charges functionality not available.&lt;/li&gt;    &lt;li&gt;Discount functionality with trade agreements not available.&lt;/li&gt;    &lt;li&gt;Planned issue, so net requirements will decrease upon posting the consumption.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Method 4: Purchase order&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Item transactions are consumed on a packing slip update or when the customer or vendor is invoiced. It depends how the purchase order was created: see my post &lt;a href="http://patrikluca.blogspot.com/2012/01/purchase-orders-in-project-management.html" target="_blank"&gt;Purchase orders in project management&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;Possible to set it as non chargeable, hence not invoicing it to the customer.&lt;/li&gt;    &lt;li&gt;Possibility of partial deliveries.&lt;/li&gt;    &lt;li&gt;Possible for all project types.&lt;/li&gt;    &lt;li&gt;Missellaneous charges functionality available.&lt;/li&gt;    &lt;li&gt;Discount functionality with trade agreements available.&lt;/li&gt; &lt;/ul&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/1733643130206451264/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/1733643130206451264?isPopup=true" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1733643130206451264" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/1733643130206451264" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/01/about-registering-item-consumption-on.html" rel="alternate" title="About registering item consumption on projects" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQgXgf4F8n83i_Kq02LyjN0z21TYL1Nr6UegF0DsKE4pEKGTRbpiMo5X7StndKDFnfnnvJCrxCYVrxTjYKPg09lSwFm00fkqMTZG1gP08B1Gnca_uqxKgRCAuQ0s2VFDVnzWpKTwZW6HWV/s72-c/20120109.jpg" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-6709801617449375824</id><published>2012-01-02T16:38:00.001+01:00</published><updated>2012-01-02T16:38:06.406+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Accounts Payable"/><category scheme="http://www.blogger.com/atom/ns#" term="Axapta"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Purchase orders in project management</title><content type="html">&lt;p&gt;Some information about creating &lt;strong&gt;purchase orders&lt;/strong&gt; for &lt;strong&gt;projects&lt;/strong&gt; in &lt;strong&gt;AX 2012&lt;/strong&gt; can be found on &lt;a href="http://technet.microsoft.com/en-us/library/aa571150.aspx" target="_blank"&gt;TechNet&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the past, I wrote already a post &lt;a href="http://patrikluca.blogspot.com/2011/01/project-purchase-orders-vs-purchase.html" target="_blank"&gt;Project Purchase Orders vs Purchase Orders&lt;/a&gt;. This post was valid for &lt;strong&gt;AX 2009&lt;/strong&gt; and before, some changes have been made in &lt;strong&gt;AX 2012&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;I would like to extend this information somewhat in this post.&lt;/p&gt;  &lt;p&gt;As mentioned in the &lt;a href="http://technet.microsoft.com/en-us/library/aa571150.aspx" target="_blank"&gt;TechNet article&lt;/a&gt;, three types of &lt;strong&gt;purchase orders&lt;/strong&gt; can be distinguished. I call them the manually created purchase orders for a project.&lt;/p&gt;  &lt;span id="fullpost"&gt;&lt;h3&gt;Project purchase order&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A &lt;strong&gt;project purchase order&lt;/strong&gt; is created directly on the project (&lt;strong&gt;Item task &amp;gt; Purchase Order&lt;/strong&gt;).&lt;/li&gt;    &lt;li&gt;The purchase order has the Project-Id in the header and on each line.&lt;/li&gt;    &lt;li&gt;Something one should be aware of, is that goods &lt;strong&gt;&lt;u&gt;&lt;em&gt;NEVER&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt; enter inventory for a project purchase order. As consequence they cannot be added into a &lt;strong&gt;shipment&lt;/strong&gt; for example.&lt;/li&gt;    &lt;li&gt;Items are consumed (and hence become visible as project transaction and cost on the project) upon posting the invoice on the purchase order.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Purchase order derived from a project sales order&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Creating such a purchase order is done from a project sales order.&lt;/li&gt;    &lt;li&gt;The purchase order has the Project-Id in the header and on each line.&lt;/li&gt;    &lt;li&gt;Items enter inventory upon posting the &lt;strong&gt;Product Receipt&lt;/strong&gt;. Items are reserved though against the project sales order.&lt;/li&gt;    &lt;li&gt;Items are consumed (and hence become visible as project transaction and cost on the project) upon invoicing the items to the customer (and not upon posting the purchase order invoice).&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Purchase order derived from a project item requirement&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Creating such a purchase order is done from a project item requirement.&lt;/li&gt;    &lt;li&gt;The purchase order has the Project-Id in the header and on each line.&lt;/li&gt;    &lt;li&gt;Items enter inventory upon posting the &lt;strong&gt;Product Receipt&lt;/strong&gt;. Items are reserved though against the project item requirement.&lt;/li&gt;    &lt;li&gt;Items are consumed (and hence become visible as project transaction and cost on the project) upon posting the packing slip for the project item requirement (and not upon posting the purchase order invoice).&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Purchase orders created through MRP run&lt;/h3&gt;  &lt;p&gt;A fourth, not mentioned case in the &lt;a href="http://technet.microsoft.com/en-us/library/aa571150.aspx" target="_blank"&gt;TechNet&lt;/a&gt; article, is when purchase orders are created based on &lt;strong&gt;planned purchase orders&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Such purchase orders are NEVER project purchase orders.&lt;/p&gt;  &lt;p&gt;They could be derived from a project sales order or project item requirement though to cover the requirements. There are though some slight differences with the purchase orders created in a manual way, being:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;There will be no Project-Id in the header or on the purchase order lines if the purchase order is created based upon a planned purchase order.&lt;/li&gt;    &lt;li&gt;Items are not reserved automatically: it depends upon how you executed the firming of the planned purchase order: if you choose to mark, then reservation will be the same as in the cases described above, else it won’t be reserved.&lt;/li&gt; &lt;!--EndFragment--&gt;&lt;/ul&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/6709801617449375824/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/6709801617449375824?isPopup=true" rel="replies" title="4 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6709801617449375824" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/6709801617449375824" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2012/01/purchase-orders-in-project-management.html" rel="alternate" title="Purchase orders in project management" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-814645071962701220</id><published>2011-11-04T11:09:00.001+01:00</published><updated>2011-11-04T11:09:55.155+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Organization Model"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><title type="text">Use a worker in multiple legal entities</title><content type="html">&lt;span id="fullpost"&gt;   &lt;h3&gt;Business requirement&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;In &lt;strong&gt;AX 2012&lt;/strong&gt;, there is the whole new concept about the &lt;strong&gt;Organization Model&lt;/strong&gt;. One of the scenarios you can support is to use a &lt;strong&gt;worker&lt;/strong&gt; in multiple &lt;strong&gt;legal entities&lt;/strong&gt;. To do so, you have to employ the &lt;strong&gt;worker&lt;/strong&gt; in multiple &lt;strong&gt;legal entities&lt;/strong&gt;. Let’s say for example the worker has to be able to enter hours in multiple legal entities.&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Scenario&lt;/h3&gt;    &lt;ol&gt;     &lt;li&gt;Hire a new worker by going to Human resources &amp;gt; Workers &amp;gt; Hire new worker. You’ll have to specify a Legal entity in which you are hiring the worker:        &lt;br /&gt;&lt;a href="https://picasaweb.google.com/lh/photo/tR3gmLZJWAyxfKaVx0HFMQ?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWw5OGgh_lelk7ixftJVhInk82TX48AKVOnwt9B8FaXyBXdQsX4XDiLgbznvUt4gBS7VrFXqsrTj9_qEwAwae-y2btDoSl2HJjx1j-qIU1XsdfYK-SK2ErnHAAt2Y9I2qS_XOnDbOFnOq2/s400/4-11-2011%25252010-56-25.jpg" width="358" height="400" /&gt;&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;Once you’ve created the &lt;strong&gt;worker&lt;/strong&gt;, change to another &lt;strong&gt;legal entity&lt;/strong&gt; and create a project hour journal. Add a line and try to choose the created worker: it won’t appear. &lt;/li&gt;      &lt;li&gt;To be able to enter hours for the created worker, go to the worker list page and choose &lt;strong&gt;Employment &amp;gt; Employment Details &amp;gt; New&lt;/strong&gt; and employ the &lt;strong&gt;worker&lt;/strong&gt; in another &lt;strong&gt;legal entity&lt;/strong&gt;:         &lt;br /&gt;&lt;a href="https://picasaweb.google.com/lh/photo/U5QcwC-XeFWISiip2tt4bg?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6zLiRdSD-Rmp0qXQB3u2q1bLd6l1mfoqJXHQXnVZN2izble7y3uPYRuWX29_f5ngItFO3QnU8jV6SWRDhUjqhTKOWlwzQMwm8MMEJW-uojBXEfy8wBYzXgIFuCSqwJx1r6lXEv35AvqGI/s400/4-11-2011%25252011-02-48.jpg" width="400" height="313" /&gt;&lt;/a&gt; &lt;/li&gt;      &lt;li&gt;Now you’ll be able to enter hours for the &lt;strong&gt;worker&lt;/strong&gt; in the second &lt;strong&gt;legal entity&lt;/strong&gt;. &lt;/li&gt;   &lt;/ol&gt; &lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/814645071962701220/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/814645071962701220?isPopup=true" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/814645071962701220" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/814645071962701220" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2011/11/use-worker-in-multiple-legal-entities.html" rel="alternate" title="Use a worker in multiple legal entities" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWw5OGgh_lelk7ixftJVhInk82TX48AKVOnwt9B8FaXyBXdQsX4XDiLgbznvUt4gBS7VrFXqsrTj9_qEwAwae-y2btDoSl2HJjx1j-qIU1XsdfYK-SK2ErnHAAt2Y9I2qS_XOnDbOFnOq2/s72-c/4-11-2011%25252010-56-25.jpg" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5277756027683167030.post-2292027006244119666</id><published>2011-10-24T22:41:00.001+02:00</published><updated>2011-10-25T13:43:38.486+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Axapta"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Accounting"/><category scheme="http://www.blogger.com/atom/ns#" term="Reports"/><title type="text">Printing documents linked with Document Handling while printing Reports</title><content type="html">&lt;span id="fullpost"&gt;&lt;h3&gt;Business requirement: Printing documents linked with Document Handling while printing Reports&lt;/h3&gt; &lt;/span&gt;  &lt;p&gt;This post describes how you can print automatically documents linked with &lt;strong&gt;Document Handling&lt;/strong&gt; while printing a &lt;strong&gt;Report&lt;/strong&gt;. This post elaborates following business scenario: users attach documents to the &lt;strong&gt;Project&lt;/strong&gt; entity. Upon printing the &lt;strong&gt;Project Invoice&lt;/strong&gt;, these documents should be printed right away and in an automatic way.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="https://picasaweb.google.com/lh/photo/0HeMoomnoUePosyPNNHsjw?feat=embedwebsite"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM6TbP1tgc6WJhvYFlPDqpa6dg3ZZ-hebOTM_btWi0ehVYN90SxW6hreu8FEwwxM-8yrhAXFULBf_1mxMN0rkvFUZKIN6Gy3ouFLhdYjXm-IwxEWy3pzuFyq9oLcBN0UqzykS8Y4hd0WLj/s400/25-10-2011%25252012-50-34.jpg" width="400" height="209" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;span id="fullpost"&gt;   &lt;h3&gt;Solution:&lt;/h3&gt;    &lt;p&gt;Add a new &lt;strong&gt;ProjTable&lt;/strong&gt; variable to the &lt;strong&gt;classDeclaration&lt;/strong&gt; of the &lt;strong&gt;Report ProjInvoice&lt;/strong&gt;: it will be used to store the value of our currently printed Project.&lt;/p&gt;    &lt;p&gt;Create a method on table &lt;strong&gt;ProjInvoiceJour&lt;/strong&gt; to get the &lt;strong&gt;ProjId&lt;/strong&gt; for the currently printed Project Invoice. In this scenario we suppose no Project Invoices are made over multiple Projects, so there is a one to one link between a Project Invoice and a Project (which is not an obligation in &lt;strong&gt;Dynamics AX&lt;/strong&gt;).&lt;/p&gt;    &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;display ProjId projId()&lt;br /&gt;{&lt;br /&gt;  ProjInvoiceItem projInvoiceItem;&lt;br /&gt;  ProjInvoiceEmpl projInvoiceEmpl;&lt;br /&gt;  ProjInvoiceCost projInvoiceCost;&lt;br /&gt;  ProjInvoiceRevenue projInvoiceRevenue;&lt;br /&gt;  ProjInvoiceOnAcc projInvoiceOnAcc;&lt;br /&gt;  ProjId projId = '';&lt;br /&gt;  ;&lt;br /&gt;&lt;br /&gt;  while select projInvoiceEmpl&lt;br /&gt;    where projInvoiceEmpl.ProjInvoiceId == &lt;br /&gt;                        this.ProjInvoiceId&lt;br /&gt;    &amp;amp;&amp;amp; projInvoiceEmpl.InvoiceDate == this.InvoiceDate&lt;br /&gt;  {&lt;br /&gt;    if (projId &amp;amp;&amp;amp; projId != projInvoiceEmpl.ProjId)&lt;br /&gt;      return &amp;quot;&amp;quot;;&lt;br /&gt;    projId = projInvoiceEmpl.ProjId;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  while select projInvoiceItem&lt;br /&gt;    where projInvoiceItem.ProjInvoiceId == &lt;br /&gt;                        this.ProjInvoiceId&lt;br /&gt;    &amp;amp;&amp;amp; projInvoiceItem.InvoiceDate == this.InvoiceDate&lt;br /&gt;  {&lt;br /&gt;    if (projId &amp;amp;&amp;amp; projId != projInvoiceItem.ProjId)&lt;br /&gt;      return &amp;quot;&amp;quot;;&lt;br /&gt;    projId = projInvoiceItem.ProjId;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  while select projInvoiceCost&lt;br /&gt;    where projInvoiceCost.ProjInvoiceId == &lt;br /&gt;                        this.ProjInvoiceId&lt;br /&gt;    &amp;amp;&amp;amp; projInvoiceCost.InvoiceDate == this.InvoiceDate&lt;br /&gt;  {&lt;br /&gt;    if (projId &amp;amp;&amp;amp; projId != projInvoiceCost.ProjId)&lt;br /&gt;      return &amp;quot;&amp;quot;;&lt;br /&gt;    projId = projInvoiceCost.ProjId;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  while select projInvoiceRevenue&lt;br /&gt;    where projInvoiceRevenue.ProjInvoiceId == &lt;br /&gt;                           this.ProjInvoiceId&lt;br /&gt;    &amp;amp;&amp;amp; projInvoiceRevenue.InvoiceDate == this.InvoiceDate&lt;br /&gt;  {&lt;br /&gt;    if (projId &amp;amp;&amp;amp; projId != projInvoiceRevenue.ProjId)&lt;br /&gt;      return &amp;quot;&amp;quot;;&lt;br /&gt;    projId = projInvoiceRevenue.ProjId;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  while select projInvoiceOnAcc&lt;br /&gt;    where projInvoiceOnAcc.ProjInvoiceId == &lt;br /&gt;                         this.ProjInvoiceId&lt;br /&gt;    &amp;amp;&amp;amp; projInvoiceOnAcc.InvoiceDate == this.InvoiceDate&lt;br /&gt;  {&lt;br /&gt;    if (projId &amp;amp;&amp;amp; projId != projInvoiceOnAcc.ProjId)&lt;br /&gt;      return &amp;quot;&amp;quot;;&lt;br /&gt;    projId = projInvoiceOnAcc.ProjId;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return projId;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Call this method in the &lt;strong&gt;fetch&lt;/strong&gt; of the &lt;strong&gt;Report ProjInvoice&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;...&lt;br /&gt;projInvoiceTable = ProjInvoiceTable::find(&lt;br /&gt;        projInvoiceJour.ProjInvoiceProjId);&lt;br /&gt;// BGN Get ProjId for the ProjInvoiceJour&lt;br /&gt;projTable = ProjTable::find(projInvoiceJour.projId());&lt;br /&gt;&lt;br /&gt;projFormLetterReport.loadPrintSettings(&lt;br /&gt;// END&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Create a &lt;strong&gt;method&lt;/strong&gt; &lt;em&gt;printLinkedDocuments&lt;/em&gt; in the &lt;strong&gt;Report&lt;/strong&gt; &lt;strong&gt;ProjInvoice&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;void printLinkedDocuments()&lt;br /&gt;{&lt;br /&gt;  #WinAPI&lt;br /&gt;  DocuRef docuRef;&lt;br /&gt;  ;&lt;br /&gt;  while select docuRef&lt;br /&gt;  where docuRef.RefCompanyId == projTable.dataAreaId&lt;br /&gt;    &amp;amp;&amp;amp; docuRef.RefTableId == tableNum(ProjTable)&lt;br /&gt;    &amp;amp;&amp;amp; docuRef.RefRecId == projTable.RecId&lt;br /&gt;  {&lt;br /&gt;    if(docuRef.RecId)&lt;br /&gt;    {&lt;br /&gt;      if (element.printJobSettings().getTarget() ==&lt;br /&gt;          PrintMedium::Printer)&lt;br /&gt;      {&lt;br /&gt;        WinAPI::shellExecute(docuRef.completeFileName(),&lt;br /&gt;          element.printJobSettings().printerPrinterName(),&lt;br /&gt;          ‘’,&lt;br /&gt;          #ShellExePrint);&lt;br /&gt;      }&lt;br /&gt;    }    &lt;br /&gt;  }&lt;br /&gt;} &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Call this method in the &lt;strong&gt;fetch&lt;/strong&gt; method of the &lt;strong&gt;ProjInvoice Report&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;code class="axapta"&gt;&lt;br /&gt;...&lt;br /&gt;this.printDocumentHeader();&lt;br /&gt;this.send(formLetterRemarks);&lt;br /&gt;// BGN Print documents linked with document handling&lt;br /&gt;this.printLinkedDocuments();&lt;br /&gt;// END&lt;br /&gt;&lt;br /&gt;if (element.page() != 1)&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;When printing the ProjInvoice Report to a Printer, the linked documents will be printed too: the linked documents will be printed on the default &lt;strong&gt;Windows&lt;/strong&gt; printer of the user.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1583175612597963";
/* 728x90, created 12/24/08 */
google_ad_slot = "9962391791";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</content><link href="http://patrikluca.blogspot.com/feeds/2292027006244119666/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/5277756027683167030/2292027006244119666?isPopup=true" rel="replies" title="2 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2292027006244119666" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/5277756027683167030/posts/default/2292027006244119666" rel="self" type="application/atom+xml"/><link href="http://patrikluca.blogspot.com/2011/10/printing-documents-linked-with-document.html" rel="alternate" title="Printing documents linked with Document Handling while printing Reports" type="text/html"/><author><name>Patrik Luca</name><uri>http://www.blogger.com/profile/12241736960596376811</uri><email>noreply@blogger.com</email><gd:image height="24" rel="http://schemas.google.com/g/2005#thumbnail" src="http://2.bp.blogspot.com/_YLb3OfoefzA/SqIiYJwZjDI/AAAAAAAABBY/NqJn_yrX7wg/S220/2009-08-28+augustus+2009+002.JPG" width="32"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM6TbP1tgc6WJhvYFlPDqpa6dg3ZZ-hebOTM_btWi0ehVYN90SxW6hreu8FEwwxM-8yrhAXFULBf_1mxMN0rkvFUZKIN6Gy3ouFLhdYjXm-IwxEWy3pzuFyq9oLcBN0UqzykS8Y4hd0WLj/s72-c/25-10-2011%25252012-50-34.jpg" width="72"/><thr:total>2</thr:total></entry></feed>