<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3099421127115759789</id><updated>2026-05-05T16:55:20.018+05:30</updated><category term="#AX2012"/><category term="Dyanaimcs AX"/><category term="AX 2012"/><category term="#AX 2012"/><category term="#AX2012r3"/><category term="Dynamics AX"/><category term="Dynamics AX X++ Code for Reading data from AX to Excel"/><category term="# C#Weservice Consuming"/><category term="#AIF"/><category term="#AX 2012 Company curreny code"/><category term="#AX HTTP PORT"/><category term="#AX2012CodeEmails"/><category term="#AX7"/><category term="#Currency code"/><category term="#Customer #Vendor #Employee/Worker #AX2012X++"/><category term="#Data Analysis"/><category term="#Dynamics 365"/><category term="#Dynamics AX AIF Webserivice"/><category term="#ExportEmailsPrintmanagmentdestinationSettings"/><category term="#MultiSelectionHelper"/><category term="#MultiselectHelper"/><category term="#OpenUrlwith #ode"/><category term="#Power BI"/><category term="#PrintManagementEmails"/><category term="#PrintmgmtCustomers"/><category term="#Reporting Tool"/><category term="#System.Net.WebException:The requestfailedwithHTTPstatus 401: Unauthorized"/><category term="#WEB reference"/><category term="#Web service Credentials"/><category term="#Workflow"/><category term="#X++ code to create or update party address"/><category term="#X++CodePrintmanagementdestinationSettings"/><category term="#dynamics AX7"/><category term="#url"/><category term="AIF"/><category term="AIF Outbound service"/><category term="AX 2012 Admin rights X++ code"/><category term="AX 2012 SSRS Reporting"/><category term="AX 2012 User rights"/><category term="AX to CSV"/><category term="AX to Excel file"/><category term="AX2012"/><category term="AX2012R3FreeCourses"/><category term="ActiveWorkflowsX++"/><category term="Approvals comments"/><category term="CSV to AX"/><category term="Check security rights"/><category term="Comma separated file data to AX."/><category term="Controller class"/><category term="D365 courses"/><category term="D365F&amp;O courses"/><category term="Dimensions"/><category term="Dynamics AX X++ Code for Reading data from Excel Sheet"/><category term="Dynamics Fincance and operations"/><category term="Excel to AX"/><category term="Form datasource multi selection"/><category term="Identify Table in Map"/><category term="IsSytemAdministrator"/><category term="Maps"/><category term="Pendingworkflows"/><category term="Primary key"/><category term="PrimaryIndex"/><category term="Printerjobsetup"/><category term="Reading data from CSV file to AX"/><category term="Runtime design select"/><category term="SSRS Reports"/><category term="Select multiple records on the form to update together"/><category term="Table"/><category term="Tables"/><category term="Text File"/><category term="Text to AX"/><category term="Update Financial dimension"/><category term="Workflow approvalsqueue"/><category term="Workflow comments"/><category term="WorkflowActions"/><category term="WorkflowApprovals"/><category term="WorkflowTrackingMessage"/><category term="Writing data to CSV file from AX"/><category term="Writing to Txt file"/><category term="X++ Code for reading data from txt file"/><category term="X++ Code to override lookup()"/><category term="X++ Code to write data from AX to Excel sheet"/><category term="X++ code for writing to Txtfile"/><category term="X++WorkflowsPending"/><category term="free for downladed"/><category term="lookup() method"/><category term="txt to AX"/><category term="update default dimensions"/><title type='text'>Dynamics AX2012, AX7, Dynamics 365 Finance and Operations</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-8872284156058674735</id><published>2020-01-15T16:04:00.000+05:30</published><updated>2020-01-15T16:04:06.807+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012CodeEmails"/><category scheme="http://www.blogger.com/atom/ns#" term="#ExportEmailsPrintmanagmentdestinationSettings"/><category scheme="http://www.blogger.com/atom/ns#" term="#PrintManagementEmails"/><title type='text'>X++ code to Export emails under print management destination settings</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
printMgmtSettings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printMgmtSettings;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printerSetting;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SRSPrintDestinationSettings printDestinationSetting;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PrintMgmtDocInstance&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while select printMgmtSettings&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting = new SRSPrintDestinationSettings();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.unpack(printMgmtSettings.PrintJobSettings);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(printDestinationSetting.printMediumType() == srsPrintMediumType::Email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select * from printMgmtDocInstance where printMgmtDocInstance.RecId==printMgmtSettings.ParentId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;%1 -%2&quot;,printMgmtDocInstance.NodeType, printDestinationSetting.emailTo()));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/8872284156058674735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-export-emails-under-print.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/8872284156058674735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/8872284156058674735'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-export-emails-under-print.html' title='X++ code to Export emails under print management destination settings'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-7039222889619879238</id><published>2020-01-15T15:11:00.000+05:30</published><updated>2020-01-15T15:11:02.263+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#PrintmgmtCustomers"/><category scheme="http://www.blogger.com/atom/ns#" term="#X++CodePrintmanagementdestinationSettings"/><title type='text'>X++ code to setup print management destination settings on Customer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;PrintMgmtSettings&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printMgmtSettings;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PrintMgmtDocInstance&amp;nbsp; &amp;nbsp; printMgmtDocInstance;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CustTable&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;custtable = CustTable::find(&quot;C005751&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printerSetting;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SRSPrintDestinationSettings printDestinationSetting;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printMgmtDocInstance&amp;nbsp; &amp;nbsp; = printMgmtDocInstance::find(custtable.RecId,77,printMgmtNodeType::CustTable,printMgmtDocumentType::CustAccountStatement,1);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(printMgmtDocInstance.RecId == 0 &amp;amp;&amp;amp; custtable.email() != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printerSetting = conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting = new SRSPrintDestinationSettings();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.DocumentType = printMgmtDocumentType::CustAccountStatement;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //printMgmtDocInstance.Name = strFmt(&quot;Email &#39;Account Statements&#39; to %1&quot;, custtable.AccountNum);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.NodeType = printMgmtNodeType::CustTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.PrintType = PrintMgmtDocInstancetype::Original;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.PriorityId = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.ReferencedRecId = custtable.recId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.ReferencedTableId = 77;// CustTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtDocInstance.insert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // just use a new instance of SRSPrintDestinationSettings to serialize an empty container&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.unpack(printerSetting);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.printMediumType(srsPrintMediumType::Email);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.emailTo(custtable.email());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //printDestinationSetting.emailCc(ccEmailString);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.emailSubject(&quot;Proserv statements&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printDestinationSetting.emailAttachmentFileFormat(SRSReportFileFormat::PDF);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printerSetting = printDestinationSetting.pack();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.Description = printmgmtdocInstance.Name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.NumberOfCopies = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.ParentId = printmgmtdocInstance.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.PrintJobSettings = printerSetting;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.PriorityId = printMgmtDocInstance.PriorityId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printMgmtSettings.insert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/7039222889619879238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-setup-print-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7039222889619879238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7039222889619879238'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-setup-print-management.html' title='X++ code to setup print management destination settings on Customer'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-6537126661552264868</id><published>2020-01-15T15:01:00.001+05:30</published><updated>2020-01-15T15:01:40.712+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#Customer #Vendor #Employee/Worker #AX2012X++"/><category scheme="http://www.blogger.com/atom/ns#" term="#X++ code to create or update party address"/><title type='text'>X++ code to create/update party contact details- Customer/vendor/Employee/Prospect</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
below code to update customer/Vendor contact details like email, telephone, fax, etc.,&lt;br /&gt;
&lt;br /&gt;
CustTable custTable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void setUpContacts(Addressing _desc, RefRecId _party,LogisticsElectronicAddressMethodType _type,LogisticsElectronicAddressLocator _value )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirPartyLocation&amp;nbsp; &amp;nbsp; dirPartyLocation,dirPartyLocationNew;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsLocation&amp;nbsp; &amp;nbsp;logisticsLocation;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogisticsElectronicAddress logEleAddress;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select forupdate&amp;nbsp; forUpdate dirPartyLocation where dirPartyLocation.Party == _party&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join logisticsLocation where logisticsLocation.Description == _desc&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; logisticsLocation.recid==dirPartyLocation.Location&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join forUpdate logEleAddress where logEleAddress.Location == logisticsLocation.recid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; logEleAddress.Type == _type;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(logEleAddress.RecId != 0 &amp;amp;&amp;amp; logEleAddress.Locator != _value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.Locator = _value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if(logEleAddress.RecId == 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logisticsLocation = LogisticsLocation::create(_desc);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyLocationNew.Party = _party;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyLocationNew.Location = logisticsLocation.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyLocationNew.ValidFrom = DateTimeUtil::utcNow();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyLocationNew.ValidTo = DateTimeUtil::maxValue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dirPartyLocationNew.insert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.Location = logisticsLocation.RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.Type = _type;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.Locator = _value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logEleAddress.insert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; custTable = CustTable::find(&quot;C004800&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;setUpContacts(&quot;Email&quot;,custTable.Party,LogisticsElectronicAddressMethodType::Email,&quot;prasan@domain.com&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Contact Name/description, Party, contact type, Email address&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/6537126661552264868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-createupdate-party-contact.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6537126661552264868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6537126661552264868'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2020/01/x-code-to-createupdate-party-contact.html' title='X++ code to create/update party contact details- Customer/vendor/Employee/Prospect'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-5218249721903489686</id><published>2019-11-12T14:23:00.002+05:30</published><updated>2019-11-12T14:23:54.588+05:30</updated><title type='text'>New Microsoft certifications for Dynamics 365 - role based</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
HI,&lt;br /&gt;
&lt;br /&gt;
Microsoft has released its updated certifications on all Microsoft stack.&lt;br /&gt;
&lt;br /&gt;
you can also filter the technology based on Dynamics 365 for certifications Dynamics 365 Finance and operations. Most of the AX previous certifications will expire this year end and until june next year, but the transcript will be available if you have completed any before they expire.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.microsoft.com/en-us/learning/browse-all-certifications.aspx&quot;&gt;https://www.microsoft.com/en-us/learning/browse-all-certifications.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGOAjPUWw8KwyWo3jfz4v1TbAyPcOCaMToz3q2u4Qzk-O2joD88aq_wqpEDojv2PDLW5n96UIqTOAr_Kz2qXbK8_P4bmc4G2CJEiQmwpKcCti3XEG4TgCqQwzoWxTEpOCHvgKj72eWTM/s1600/MSC.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;883&quot; data-original-width=&quot;1357&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGOAjPUWw8KwyWo3jfz4v1TbAyPcOCaMToz3q2u4Qzk-O2joD88aq_wqpEDojv2PDLW5n96UIqTOAr_Kz2qXbK8_P4bmc4G2CJEiQmwpKcCti3XEG4TgCqQwzoWxTEpOCHvgKj72eWTM/s640/MSC.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Good luck.&lt;br /&gt;
Thanks&lt;br /&gt;
Prasan&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/5218249721903489686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/new-microsoft-certifications-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/5218249721903489686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/5218249721903489686'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/new-microsoft-certifications-for.html' title='New Microsoft certifications for Dynamics 365 - role based'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGOAjPUWw8KwyWo3jfz4v1TbAyPcOCaMToz3q2u4Qzk-O2joD88aq_wqpEDojv2PDLW5n96UIqTOAr_Kz2qXbK8_P4bmc4G2CJEiQmwpKcCti3XEG4TgCqQwzoWxTEpOCHvgKj72eWTM/s72-c/MSC.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-9105532098081159977</id><published>2019-11-12T14:11:00.000+05:30</published><updated>2019-11-12T14:15:03.758+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AX2012R3FreeCourses"/><category scheme="http://www.blogger.com/atom/ns#" term="D365 courses"/><category scheme="http://www.blogger.com/atom/ns#" term="D365F&amp;O courses"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics Fincance and operations"/><category scheme="http://www.blogger.com/atom/ns#" term="free for downladed"/><title type='text'>List of free AX7/D365 courses available for download</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Below are the list of AX7 and D365 finance and operations courses available for free downloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://community.dynamics.com/365/b/learningcurriculum/posts/list-of-courses-available-for-download&quot;&gt;https://community.dynamics.com/365/b/learningcurriculum/posts/list-of-courses-available-for-download&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
and additional R3 courses available in below link&lt;br /&gt;
&lt;a href=&quot;https://community.dynamics.com/365/b/learningcurriculum/posts/we-ve-added-more-ax-2012-r3-courses-for-download&quot;&gt;https://community.dynamics.com/365/b/learningcurriculum/posts/we-ve-added-more-ax-2012-r3-courses-for-download&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
also about how to download and run this course information will be available in the below link.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://community.dynamics.com/365/b/learningcurriculum/posts/how-to-run-a-downloaded-course&quot;&gt;https://community.dynamics.com/365/b/learningcurriculum/posts/how-to-run-a-downloaded-course&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
PS: All information are provided from Microsoft websites.&lt;br /&gt;
&lt;br /&gt;
Happy AX/D365 learning and good luck,&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Prasan&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/9105532098081159977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/list-of-ax7d365-courses.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/9105532098081159977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/9105532098081159977'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/list-of-ax7d365-courses.html' title='List of free AX7/D365 courses available for download'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-2018391871496351796</id><published>2019-11-12T13:43:00.001+05:30</published><updated>2019-11-12T13:43:55.696+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ActiveWorkflowsX++"/><category scheme="http://www.blogger.com/atom/ns#" term="Pendingworkflows"/><category scheme="http://www.blogger.com/atom/ns#" term="WorkflowActions"/><category scheme="http://www.blogger.com/atom/ns#" term="WorkflowApprovals"/><category scheme="http://www.blogger.com/atom/ns#" term="X++WorkflowsPending"/><title type='text'>AX Pending workflows using X++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Below is the X++ code to get the active pending workflows which are waiting for approvals and yet to approve.&lt;br /&gt;
&lt;br /&gt;
workflowTrackingStatusTable is the header table which holds information about the order and the order which triggered the workflow and the current status of the workflow approvals.&lt;br /&gt;
&lt;br /&gt;
workflowworkitemTable is the table which holds the information about who are all users are required to action the workflow for the particular workflow instance, once the approvee actioned then record will be deleted from this table and new approver is added to this table with new record.&lt;br /&gt;
&lt;br /&gt;
workflowtrackingcommenttable will holds the comments of the user who has submitted, approved,rejected.&lt;br /&gt;
&lt;br /&gt;
while select /*firstOnly10*/ workflowTrackingStatusTable //order by workflowworkitemTable.createdDateTime asc&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where workflowTrackingStatusTable.TrackingStatus == WorkflowTrackingStatus::Pending&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;amp;&amp;amp; workflowTrackingStatusTable.InstanceNumber==&#39;INS2367227&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //TODO: for testing- commet it in LIVE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (workflowTrackingStatusTable.ContextTableId == 1425//Supplier Invoice&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 1967//Sales quotations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 345//Purchase order&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 1551//Purchase requisitions&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 617//Invoice proposals&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 484//Travel expense claims&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || workflowTrackingStatusTable.ContextTableId == 4627) //Timesheet&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowTrackingStatusTable.ContextCompanyId != &quot;01&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; (((workflowTrackingStatusTable.ContextTableId != 1551 &amp;amp;&amp;amp; workflowTrackingStatusTable.ContextTableId != 484) &amp;amp;&amp;amp; workflowTrackingStatusTable.ContextCompanyId != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || (workflowTrackingStatusTable.ContextTableId == 1551 || workflowTrackingStatusTable.ContextTableId == 484))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowTrackingStatusTable.ContextRecId != 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowTrackingStatusTable.ContextTableId != 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join workflowworkitemTable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where workflowTrackingStatusTable.CorrelationId==workflowworkitemTable.CorrelationId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowworkitemTable.Status==WorkflowWorkItemStatus::Pending&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;amp;&amp;amp; workflowworkitemTable.UserId == &#39;prasan.k&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowworkitemTable.modifiedDateTime &amp;gt;= dateStart&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //TODO:Uncomment the date criteia when release to LIVE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outer Join&amp;nbsp; workflowtrackingtable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where workflowtrackingtable.Workflowtrackingstatustable==workflowTrackingStatusTable.recId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowtrackingtable.TrackingType == WorkflowTrackingType::Submission&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; workflowtrackingtable.User == workflowworkitemTable.UserId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outer join&amp;nbsp; workflowtrackingcommenttable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where workflowtrackingcommenttable.trackingid ==workflowtrackingtable.trackingId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/2018391871496351796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/ax-pending-workflows-using-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/2018391871496351796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/2018391871496351796'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/ax-pending-workflows-using-x.html' title='AX Pending workflows using X++'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-5764070761732182016</id><published>2019-11-12T13:36:00.000+05:30</published><updated>2019-11-12T13:36:39.932+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#Workflow"/><category scheme="http://www.blogger.com/atom/ns#" term="Approvals comments"/><category scheme="http://www.blogger.com/atom/ns#" term="Workflow approvalsqueue"/><category scheme="http://www.blogger.com/atom/ns#" term="Workflow comments"/><category scheme="http://www.blogger.com/atom/ns#" term="WorkflowTrackingMessage"/><title type='text'>Workflow Approvals message tracking X++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Helps to find the approvals tracking like who and all are approved so far for the particular workflow and what are the workflow approval comments as such in X++ code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private str getworkflowTrackmessage(WorkflowInstanceNumber _instanceNumber)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WORKFLOWTRACKINGSTATUSTABLE w;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WORKFLOWTRACKINGTABLE wt ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WORKFLOWTRACKINGTABLE wt2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; workflowsteptable wst;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; workflowElementtable wet;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; workflowTrackingWorkItem wtw;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UserInfo user;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UserInfo user2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str txt,ret;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; workflowtrackingcommenttable wtct;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean first=true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while select * from w ORDER BY wt2.CREATEDdATEtIME ASC&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;where w.instANCEnUMBER==_instanceNumber//&#39;INS2380404&#39;//INS2383500&#39;//&lt;br /&gt;
&amp;nbsp; &amp;nbsp; join&amp;nbsp; wt2 where w.recId == wt2.workflowTrackingStatusTable &amp;amp;&amp;amp; wt2.USER!=&#39;axwfexec&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; join wtct where wt2.RecId==wtct.WorkflowTrackingTable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; outer join wtw where wt2.recId==wtw.workflowTrackingTable&lt;br /&gt;
&amp;nbsp; &amp;nbsp; outer join wst where wst.stepId == wt2.stepId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // join wet where wet.ElementId == wt2.ElementId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; outer join user where user.id == wt2.User&lt;br /&gt;
&amp;nbsp; &amp;nbsp; outer join user2 where user2.id==wtw.ToUser&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt =&#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wt2.TrackingType == WorkflowTrackingType::Approval)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 : %2 Approved on %3 &quot;, wst.Name, User.name,wt2.createdDateTime);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wtct.Comment != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 ,Comments: %2&quot;,txt, wtct.Comment);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(txt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wt2.TrackingType == WorkflowTrackingType::Delegation)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt =strFmt(&quot;%1 : %2 Delegated to %3 on %4&quot;,wst.Name,User.name,user2.name,wt2.createdDateTime);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wtct.Comment != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 ,Comments: %2&quot;,txt, wtct.Comment);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(txt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (wt2.TrackingType == WorkflowTrackingType::Rejection)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 : %2 Rejected on %3&quot;,wst.Name, User.name,wt2.createdDateTime);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wtct.Comment != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 ,Comments: %2&quot;,txt, wtct.Comment);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(txt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wt2.TrackingType == WorkflowTrackingType::Creation)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt =strFmt(&quot;%1 : Assigned to user: %2 on %3&quot;,wst.Name, User.name,wt2.createdDateTime);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wtct.Comment != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 ,Comments: %2&quot;,txt, wtct.Comment);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(txt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wt2.TrackingType == WorkflowTrackingType::Submission)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;Submitted by : %1 on %2&quot;, User.name,wt2.createdDateTime);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wtct.Comment != strMin())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txt = strFmt(&quot;%1 ,Comments: %2&quot;, txt, wtct.Comment);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(txt);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(first)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = txt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = ret + &#39;\n&#39; + txt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/5764070761732182016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/workflow-approvals-message-tracking-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/5764070761732182016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/5764070761732182016'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/11/workflow-approvals-message-tracking-x.html' title='Workflow Approvals message tracking X++'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-7816187786184743805</id><published>2019-10-30T13:16:00.002+05:30</published><updated>2019-10-30T13:16:41.612+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#MultiselectHelper"/><category scheme="http://www.blogger.com/atom/ns#" term="#MultiSelectionHelper"/><category scheme="http://www.blogger.com/atom/ns#" term="Form datasource multi selection"/><category scheme="http://www.blogger.com/atom/ns#" term="Select multiple records on the form to update together"/><title type='text'>MultiSelectHelper class - Select multilpe records in form grid to update the data altogether once.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1) Create a class that extends the runbase class.&lt;br /&gt;
&lt;br /&gt;
2) write a main method to handle the class methods and its arugments&lt;br /&gt;
&lt;br /&gt;
In main method declare the below helper class&lt;br /&gt;
&lt;b&gt;&amp;nbsp;MultiSelectionHelper&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; helper;//multiselect&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and also validate the class is invoked based on correct paramaters and caller&lt;br /&gt;
&lt;br /&gt;
for example: if(_args &amp;amp;&amp;amp; _args.dataset() == tableNum(VendInvoiceInfoTable))//if class is invoked from table VendInvoiceInfoTable.&lt;br /&gt;
&lt;br /&gt;
also initialize the helper class as below&lt;br /&gt;
&amp;nbsp;&lt;b&gt;helper&amp;nbsp; = MultiSelectionHelper::createFromCaller(_args.caller());&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
read the first record as vendInvoiceInfoTable = &lt;b&gt;helper.getFirst();&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and next records as&amp;nbsp;vendInvoiceInfoTable = &lt;b&gt;helper.getNext();&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
loop the multiple records recading&lt;br /&gt;
while (vendInvoiceInfoTable)&lt;br /&gt;
{&lt;br /&gt;
info(vendInvoiceInfoTable.num);&lt;br /&gt;
&lt;br /&gt;
vendInvoiceInfoTable = helper.getNext();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
refresh the caller form - formDataSourceRefresh(VendInvoiceInfoTable); this will help to show the data updated inmmidiately after the function runs.&lt;br /&gt;
&lt;br /&gt;
Invoke this class using Action menu item and please make sure to setup the &lt;b&gt;menu property :MultiSelect to YES &lt;/b&gt;whereever you add this menuitem on the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
complete example:&lt;br /&gt;
&lt;br /&gt;
MultiSelectionHelper&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; helper;//multiselect&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(_args &amp;amp;&amp;amp; _args.dataset() == tableNum(VendInvoiceInfoTable))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; helper&amp;nbsp; = MultiSelectionHelper::createFromCaller(_args.caller());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vendInvoiceInfoTable = helper.getFirst();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (pendingInvoiceUpdate.prompt())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (vendInvoiceInfoTable)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(vendInvoiceInfoTable ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info(vendInvoiceInfoTable.num);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vendInvoiceInfoTable = helper.getNext();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formDataSourceRefresh(VendInvoiceInfoTable);//refresh the caller form&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/7816187786184743805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/10/multiselecthelper-class-select-multilpe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7816187786184743805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7816187786184743805'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/10/multiselecthelper-class-select-multilpe.html' title='MultiSelectHelper class - Select multilpe records in form grid to update the data altogether once.'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-6588764358716123309</id><published>2019-03-20T16:17:00.000+05:30</published><updated>2019-03-20T18:59:00.398+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="# C#Weservice Consuming"/><category scheme="http://www.blogger.com/atom/ns#" term="#AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="#AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#AX HTTP PORT"/><category scheme="http://www.blogger.com/atom/ns#" term="#Dynamics AX AIF Webserivice"/><category scheme="http://www.blogger.com/atom/ns#" term="#System.Net.WebException:The requestfailedwithHTTPstatus 401: Unauthorized"/><category scheme="http://www.blogger.com/atom/ns#" term="#WEB reference"/><category scheme="http://www.blogger.com/atom/ns#" term="#Web service Credentials"/><title type='text'>Consuming AIF web services deployed from Dynamics Ax from External client- Mobile app</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi folks,&lt;br /&gt;
&lt;br /&gt;
Hope you are well!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have found some interesting things on how to communicate to AX from external client using AIF Websrvice&lt;br /&gt;
&lt;br /&gt;
Once after the service classes is created in AX and deployed under Inbound ports- the svc file exposes the client.&lt;br /&gt;
&lt;br /&gt;
we need to refer this web service reference using C#.&lt;br /&gt;
&lt;br /&gt;
IN VS we need to use &#39;Add referencne&#39; option and specify the svc file path where it path can be found on AX inbound port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the path looks like this.&lt;br /&gt;
http://SERVERNane/MicrosoftDynamicsAXAif60/Messenger/xppservice.svc&lt;br /&gt;
where Messanger in the path is the name of the service.&lt;br /&gt;
&lt;br /&gt;
once the service reference is created we need to use and refer that in C# code&lt;br /&gt;
&lt;br /&gt;
using MessangerSolution.MessangerApp;&lt;br /&gt;
=&amp;gt;Name of the service refrence created in C# is MessangerApp&lt;br /&gt;
&lt;br /&gt;
declare the service&lt;br /&gt;
MessangerApp.BasicHttpBinding_PSV_Messenger &lt;b&gt;app &lt;/b&gt;= new BasicHttpBinding_PSV_Messenger();&lt;br /&gt;
&lt;br /&gt;
Providing credentials:&lt;br /&gt;
app.UseDefaultCredentials = FALSE;&lt;br /&gt;
app.Credentials = new System.Net.NetworkCredential(&quot;USERVNAME&quot;,&quot;SECURE PASSWORD&quot;,&quot;DOMAIN&quot;);&lt;br /&gt;
&lt;br /&gt;
then you can invoke the service class methods like&lt;br /&gt;
app.PassMessage();&lt;br /&gt;
&lt;br /&gt;
This also fixes the below issue on network credentials:&lt;br /&gt;
System.Net.WebException: The request failed with HTTP status 401: Unauthorized&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/6588764358716123309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/03/consuming-aif-web-services-deployed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6588764358716123309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6588764358716123309'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2019/03/consuming-aif-web-services-deployed.html' title='Consuming AIF web services deployed from Dynamics Ax from External client- Mobile app'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-3069653243422265152</id><published>2017-12-27T13:04:00.002+05:30</published><updated>2017-12-27T13:04:51.573+05:30</updated><title type='text'>Database Re-Index script</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;Hi, Below is the script to re-build the database indesxes- to imporove performance of the system. hope this helps&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;nocount&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectid &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexid &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;INT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitioncount &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BIGINT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @schemaname &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;130&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectname &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;130&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexname &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;130&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitionnum &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BIGINT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitions &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BIGINT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @frag &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FLOAT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;4000&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Conditionally select tables and indexes from the sys.dm_db_index_physical_stats function  &lt;br /&gt;

&lt;br /&gt;
-- and convert object and index IDs to names. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; objectid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;       INDEX_ID                     &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; indexid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;       PARTITION_NUMBER             &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; partitionnum&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;       AVG_FRAGMENTATION_IN_PERCENT &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; frag &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;INTO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   #work_to_do &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;DM_DB_INDEX_PHYSICAL_STATS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;DB_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;LIMITED&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  AVG_FRAGMENTATION_IN_PERCENT &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 10.0 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;AND&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; INDEX_ID &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Declare the cursor for the list of partitions to be processed. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DECLARE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;partitions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;CURSOR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FOR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   #work_to_do&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Open the cursor. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OPEN&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;partitions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Loop through the partitions. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHILE &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 1 &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 1 &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BEGIN&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FETCH&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;next&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;partitions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;INTO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitionnum&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @frag&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;IF&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;@@FETCH_STATUS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 0 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;BREAK&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;NAME&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;),&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;             @schemaname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;s&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;NAME&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;OBJECTS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; o &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;JOIN&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;SCHEMAS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; s &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;               &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; s&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SCHEMA_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; o&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SCHEMA_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  o&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;NAME&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;INDEXES&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectid &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;AND&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; INDEX_ID &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitioncount &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;COUNT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(*)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;PARTITIONS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectid &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;AND&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; INDEX_ID &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexid&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;-- 30 is an arbitrary decision point at which to switch between reorganizing and rebuilding. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;IF&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @frag &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 30.0 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39;ALTER INDEX &#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39; ON &#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @schemaname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39;.&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39; REORGANIZE&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;IF&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @frag &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 30.0 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39;ALTER INDEX &#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @indexname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39; ON &#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @schemaname &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39;.&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @objectname &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39; REBUILD WITH(ONLINE = ON, MAXDOP = 8)&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;IF&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @partitioncount &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 1 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39; PARTITION=&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;                       &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;CAST&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@partitionnum &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@command&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;print&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;whoops&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
 &lt;br /&gt;

&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;PRINT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;N&#39;Executed: &#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; @command&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Close and deallocate the cursor. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;CLOSE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;partitions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DEALLOCATE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;partitions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;
-- Drop the temporary table. &lt;br /&gt;

&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DROP&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;TABLE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; #work_to_do&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;

&lt;br /&gt;
&lt;br /&gt;

&lt;/span&gt;&lt;span style=&quot;color: maroon; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: maroon; font-size: x-small;&quot;&gt;sp_updatestats&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/3069653243422265152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/12/database-re-index-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3069653243422265152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3069653243422265152'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/12/database-re-index-script.html' title='Database Re-Index script'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-1706775113796274439</id><published>2017-05-03T15:38:00.003+05:30</published><updated>2017-05-03T15:38:30.577+05:30</updated><title type='text'>List of table Ids in AX- SQL dictionary</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
If you ever want to know where all table Id of AX tables are stored? here is the answer its SQLDICTIONARY&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
here is a query to know the table ID for VendTable&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt; select tabId from sql where sql.sqlName==&#39;VendTable&#39; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;
&amp;amp;&amp;amp; sql.array==0;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Hope this Helps!&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Prasan&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/1706775113796274439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/05/list-of-table-ids-in-ax-sql-dictionary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1706775113796274439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1706775113796274439'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/05/list-of-table-ids-in-ax-sql-dictionary.html' title='List of table Ids in AX- SQL dictionary'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-6942729442161391193</id><published>2017-03-14T16:59:00.000+05:30</published><updated>2017-03-14T17:01:16.689+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#Data Analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="#Power BI"/><category scheme="http://www.blogger.com/atom/ns#" term="#Reporting Tool"/><title type='text'>Power BI documents</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Found some interesting topics that would help to explore much on data analysis and reporting.&lt;br /&gt;
&lt;br /&gt;
Microsoft Power BI Documents&lt;br /&gt;
&lt;br /&gt;
Introducing Microsoft Power BI, by Marco Russo and Alberto Ferrari:&lt;br /&gt;
&lt;a href=&quot;http://www.sqlbi.com/books/introducing-microsoft-power-bi/&quot; km.title=&quot;&quot; ms.cmpgrp=&quot;&quot; ms.cmpnm=&quot;http://www.sqlbi.com/books/introducing-microsoft-power-bi/&quot; ms.cmptyp=&quot;link&quot; ms.interactiontype=&quot;1&quot; ms.pgarea=&quot;&quot; ms.title=&quot;&quot; rel=&quot;nofollow noopener noreferrer&quot; target=&quot;_blank&quot;&gt;http://www.sqlbi.com/books/introducing-microsoft-p&lt;wbr&gt;&lt;/wbr&gt;ower-bi/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Power BI tutorial videos from Adam Saxton:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;a href=&quot;https://guyinacube.com/videos&quot; km.title=&quot;&quot; ms.cmpgrp=&quot;&quot; ms.cmpnm=&quot;https://guyinacube.com/videos&quot; ms.cmptyp=&quot;link&quot; ms.interactiontype=&quot;1&quot; ms.pgarea=&quot;&quot; ms.title=&quot;&quot; rel=&quot;nofollow noopener noreferrer&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #0563c1;&quot;&gt;https://guyinacube.com/videos&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;a href=&quot;https://www.youtube.com/guyinacube&quot; km.title=&quot;&quot; ms.cmpgrp=&quot;&quot; ms.cmpnm=&quot;https://www.youtube.com/guyinacube&quot; ms.cmptyp=&quot;link&quot; ms.interactiontype=&quot;1&quot; ms.pgarea=&quot;&quot; ms.title=&quot;&quot; rel=&quot;nofollow noopener noreferrer&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #0563c1;&quot;&gt;https://www.youtube.com/guyinacube&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;hope you get on to this.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;Thanks,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;Prasan&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/6942729442161391193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/03/hi-found-some-interesting-topics-that.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6942729442161391193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6942729442161391193'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/03/hi-found-some-interesting-topics-that.html' title='Power BI documents'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-7188537849688626173</id><published>2017-03-14T00:11:00.002+05:30</published><updated>2017-03-14T00:11:58.509+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX7"/><category scheme="http://www.blogger.com/atom/ns#" term="#Dynamics 365"/><category scheme="http://www.blogger.com/atom/ns#" term="#dynamics AX7"/><title type='text'>Dynamics AX 7 Wikipedia</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi folks,&lt;br /&gt;
&lt;br /&gt;
Below is the link where you can find documentation of AX 7.0 and dynamics 365 for operations. Happy Daxing!!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://ax.help.dynamics.com/en/&quot;&gt;https://ax.help.dynamics.com/en/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Prasan&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/7188537849688626173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/03/dynamics-ax-7-wikipedia.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7188537849688626173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7188537849688626173'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2017/03/dynamics-ax-7-wikipedia.html' title='Dynamics AX 7 Wikipedia'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-6426240073026901773</id><published>2015-09-29T09:37:00.000+05:30</published><updated>2015-09-29T09:37:10.678+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012r3"/><category scheme="http://www.blogger.com/atom/ns#" term="#OpenUrlwith #ode"/><category scheme="http://www.blogger.com/atom/ns#" term="#url"/><title type='text'>AX2012- Opening an url form AX X++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Infolog.lookupurl(&quot;&lt;a href=&quot;http://www.google.com/&quot;&gt;www.google.com&lt;/a&gt;&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this statement will quickly open google website in default browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Prasan&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/6426240073026901773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2015/09/ax2012-opening-url-form-ax-x-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6426240073026901773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6426240073026901773'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2015/09/ax2012-opening-url-form-ax-x-code.html' title='AX2012- Opening an url form AX X++ code'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-6827350529950887664</id><published>2015-09-29T09:35:00.003+05:30</published><updated>2015-09-29T09:38:49.612+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012r3"/><category scheme="http://www.blogger.com/atom/ns#" term="Update Financial dimension"/><title type='text'>AX2012- Update/Change FinancialDimension value in X++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;static void PSV_UpdateOpDivDimension_Items(Args _args)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;InventTable                         inventTable;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;DimensionAttributeValueSetStorage   dimStorage;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;DimensionAttribute                  dimAttrOpDiv;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;DimensionAttributeValue             dimAttributeValue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;changeCompany(&#39;DAT&#39;)

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;while select forUpdate inventTable

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ttsBegin;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;dimStorage = DimensionAttributeValueSetStorage::find(inventTable.DefaultDimension);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;dimAttrOpDiv = DimensionAttribute::findByName(&quot;Operating_Division&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;dimAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttrOpDiv, &#39;NewValue&#39;, true, true);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;dimStorage.addItem(dimAttributeValue);

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;inventTable.DefaultDimension = dimStorage.save();

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;inventTable.doUpdate();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ttsCommit;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This code updates the items financial dimensions to new values.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;hope this helps,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Thanks&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Prasan&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/6827350529950887664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2015/09/ax2012-updatechange-financialdimension.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6827350529950887664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/6827350529950887664'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2015/09/ax2012-updatechange-financialdimension.html' title='AX2012- Update/Change FinancialDimension value in X++ code'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-3628433275765541924</id><published>2014-09-22T14:58:00.005+05:30</published><updated>2014-09-22T14:58:45.034+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="update default dimensions"/><title type='text'>Updating the value of existing dimesnions - Default dimension</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Here is a code to update the value of particular dimensions for items&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;    InventTable                         inventTable;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;    DimensionAttributeValueSetStorage   dimStorage;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;    DimensionAttribute                  dimAttrOpDiv;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;    DimensionAttributeValue             dimAttributeValue;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;        &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;while&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;select&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;forUpdate&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; inventTable&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;ttsBegin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            dimStorage = DimensionAttributeValueSetStorage::find(inventTable.DefaultDimension);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            dimAttrOpDiv = DimensionAttribute::findByName(&lt;span style=&quot;color: darkred;&quot;&gt;&lt;span style=&quot;color: darkred;&quot;&gt;&lt;span style=&quot;color: darkred;&quot;&gt;&quot;DIMENSION NAME&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            dimAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttrOpDiv, &lt;span style=&quot;color: darkred;&quot;&gt;&lt;span style=&quot;color: darkred;&quot;&gt;&lt;span style=&quot;color: darkred;&quot;&gt;&#39;VALUE&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            dimStorage.addItem(dimAttributeValue);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            inventTable.DefaultDimension = dimStorage.save();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            inventTable.doUpdate();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;            &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;ttsCommit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;    }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/3628433275765541924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2014/09/updating-value-of-existing-dimesnions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3628433275765541924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3628433275765541924'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2014/09/updating-value-of-existing-dimesnions.html' title='Updating the value of existing dimesnions - Default dimension'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-4218419427666839783</id><published>2014-07-24T12:37:00.001+05:30</published><updated>2014-07-24T12:37:17.932+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 Admin rights X++ code"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 User rights"/><category scheme="http://www.blogger.com/atom/ns#" term="Check security rights"/><category scheme="http://www.blogger.com/atom/ns#" term="IsSytemAdministrator"/><title type='text'>Code to check the current user have system administartor rights in AX X++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Sometime before I was written a big statement to find out the System admin rights of current user. Later I realized about global function that will help us to find the same.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;isSystemAdministrator():&lt;/strong&gt; will tell you the current user is having the admin rights or not.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
if isSystemAdministrator() return true then the user is having system admin rights, else not a system admin.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Hope this helps you.&lt;br /&gt;
Prasn&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/4218419427666839783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2014/07/code-to-check-current-user-have-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4218419427666839783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4218419427666839783'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2014/07/code-to-check-current-user-have-system.html' title='Code to check the current user have system administartor rights in AX X++ code'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-4589635283210566166</id><published>2013-07-30T17:32:00.001+05:30</published><updated>2013-07-30T17:32:47.707+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#AX 2012 Company curreny code"/><category scheme="http://www.blogger.com/atom/ns#" term="#AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="#Currency code"/><title type='text'>Finding the current company curreny code in AX 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Hello,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here is the code to find the company currency code in AX 2012&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Method 1:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;currencyCode = Ledger::accountingCurrency(CompanyInfo::current());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Method 2:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;currencyCode = Ledger::accountingCurrency(CompanyInfo::Find().recid);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Method 3:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;currencyCode = CompanyInfo::standardCurrency();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Thanks, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Prasan&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/4589635283210566166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/07/finding-current-company-curreny-code-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4589635283210566166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4589635283210566166'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/07/finding-current-company-curreny-code-in.html' title='Finding the current company curreny code in AX 2012'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-1150203858192447901</id><published>2013-06-19T18:59:00.000+05:30</published><updated>2013-06-19T18:59:23.204+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012 SSRS Reporting"/><category scheme="http://www.blogger.com/atom/ns#" term="Controller class"/><category scheme="http://www.blogger.com/atom/ns#" term="Runtime design select"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS Reports"/><title type='text'>AX 2012 – SSRS Reporting : Selecting the report design at the runtime based on the static parameter (dialog field) values</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Hi,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Here
is a solution to select the design at the runtime based on dialog field values in
AX 2012 SSRS reports. Hope this will help you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Create a &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;controller&lt;/b&gt; class that &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;extends&lt;/b&gt; &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;SrsReportRunController()&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-weight: bold; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;And override &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;preRunModifyContract() &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;in the controller() class and follow
the below steps.&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-weight: bold; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-weight: bold; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt; &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;void&lt;/span&gt;
preRunModifyContract()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;paramValue1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;paramValue2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;SrsReportDataContract dataContract = this.parmReportContract();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;SrsReportRdlDataContract contract = dataContract.parmRdlContract();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;paramValue1 = contract.getValue(Param1_name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;paramValue2 = contract.getValue(Param2_name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;if&lt;/span&gt;(paramValue1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;dataContract.parmReportName(reportname.design_1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;if&lt;/span&gt;(paramValue2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;dataContract.parmReportName(reportname.design_2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;// else default design is used to display the report
which is used in main(); or you can specify your design name here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-weight: bold; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt; &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;void&lt;/span&gt; main(Args _args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;xxx controller = &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;new&lt;/span&gt;
xxx (); // Let us assume the current class as xxx&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;controller.parmReportName(reportName.defaultDesign); &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;// Make sure you specify the default design while
running the report and this is required to run the report and to get the dialog.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;controller.parmArgs(_args);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;controller.startOperation();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;And
now, Create the output menu item and specify the object type to class and specify
the object to this controller class which we create now. And the report is ready
to select the design at runtime.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Hope
this will helps you,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Prasan..
&lt;/span&gt;&lt;span style=&quot;font-family: Wingdings; mso-ascii-font-family: &amp;quot;Segoe UI&amp;quot;; mso-bidi-font-family: &amp;quot;Segoe UI&amp;quot;; mso-char-type: symbol; mso-hansi-font-family: &amp;quot;Segoe UI&amp;quot;; mso-symbol-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-char-type: symbol; mso-symbol-font-family: Wingdings;&quot;&gt;J&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/1150203858192447901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/06/ax-2012-ssrs-reporting-selecting-report.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1150203858192447901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1150203858192447901'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/06/ax-2012-ssrs-reporting-selecting-report.html' title='AX 2012 – SSRS Reporting : Selecting the report design at the runtime based on the static parameter (dialog field) values'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-2859594349376460687</id><published>2013-04-09T14:52:00.002+05:30</published><updated>2013-04-09T14:54:37.942+05:30</updated><title type='text'>AX 2012 - Technical best practices</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
you cand find the top best practices for developement in AX 2012 here&lt;br /&gt;
&lt;br /&gt;
Please &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa658028.aspx&quot; target=&quot;_blank&quot;&gt;Click here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Prasan :)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/2859594349376460687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/04/ax-2012-technical-best-practices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/2859594349376460687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/2859594349376460687'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2013/04/ax-2012-technical-best-practices.html' title='AX 2012 - Technical best practices'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-3013635696911753321</id><published>2012-08-16T17:34:00.002+05:30</published><updated>2012-08-16T17:34:29.434+05:30</updated><title type='text'>Convert/Upgrade MorphX Report to SSRS in Dynamics AX</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Convert/Upgrade MorphX Report to SSRS in Dynamics AX. Please follow the link&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://dynamicspost.blogspot.com/2012/04/convertupgrade-morphx-report-to-ssrs-in.html&quot;&gt;http://dynamicspost.blogspot.com/2012/04/convertupgrade-morphx-report-to-ssrs-in.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
:)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/3013635696911753321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/08/convertupgrade-morphx-report-to-ssrs-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3013635696911753321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/3013635696911753321'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/08/convertupgrade-morphx-report-to-ssrs-in.html' title='Convert/Upgrade MorphX Report to SSRS in Dynamics AX'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-7908754476858425236</id><published>2012-08-02T22:19:00.002+05:30</published><updated>2012-08-02T22:19:50.666+05:30</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
For some better AX links--&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://twitter.com/dynamicserphub&quot;&gt;http://twitter.com/dynamicserphub&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
-Prasan :-)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/7908754476858425236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/08/for-some-better-ax-links-httptwitter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7908754476858425236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/7908754476858425236'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/08/for-some-better-ax-links-httptwitter.html' title=''/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-8631369684141941199</id><published>2012-07-13T18:43:00.002+05:30</published><updated>2012-07-13T19:01:19.755+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="AIF Outbound service"/><category scheme="http://www.blogger.com/atom/ns#" term="AX2012"/><title type='text'>AX2012- Error executing code:  object does not have method construct</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
HI,&lt;br /&gt;
&lt;br /&gt;
When working with AX 2012 outbound document service, I faced this issue.&lt;br /&gt;
When I clicked the send electronically button on my custom created form, then the I could see the message is queued in queue manager form. On running of the batch I could see status as error with description&amp;nbsp;&quot;Error executing code: &amp;lt;empty class&amp;gt; object does not have method construct&quot;.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;You need to be few things&amp;nbsp;to fix this error. the issue is due to compilation error where the particular method is not found while run time. So perform the following steps.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot;&gt;First, compile all the objects pertaining to a AIF document service.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot;&gt;Secondly, compile the base class - AxInternalBase&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot;&gt;At last, select your project node and &quot;Generate incremental CIL&quot;.&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;this will fix this error.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;for more info refer this link:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://findax.blogspot.com/2012_03_01_archive.html#3739125515927189805&quot;&gt;http://findax.blogspot.com/2012_03_01_archive.html#3739125515927189805&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Thanks,&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
Prasan&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/8631369684141941199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/07/ax2012-error-executing-code-object-does.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/8631369684141941199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/8631369684141941199'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/07/ax2012-error-executing-code-object-does.html' title='AX2012- Error executing code: &lt;empty class&gt; object does not have method construct'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-1302035809932758569</id><published>2012-07-10T23:11:00.002+05:30</published><updated>2012-07-10T23:11:29.055+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Primary key"/><category scheme="http://www.blogger.com/atom/ns#" term="PrimaryIndex"/><category scheme="http://www.blogger.com/atom/ns#" term="Tables"/><title type='text'>Creating single field as Primary key in AX 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi Everyone, Hope you all doing well. I have come with the steps of creating the &amp;nbsp;single field as primary in AX 2012.&lt;br /&gt;
&lt;br /&gt;
1) Create the Table and add required fields to the table as you all knows.&lt;br /&gt;
2) Create an Index by dragging the required field to the Index.&lt;br /&gt;
3) Set the following Index properties:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a) AllowDuplicates to &quot;NO&quot;.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b) Alternate key to &quot;YES&quot;.&lt;br /&gt;
4) Set the&amp;nbsp;
PrimaryIndex&amp;nbsp;&amp;nbsp;property of the table to newly created index after creating the Index.&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
All The Best... :)&lt;br /&gt;
&lt;br /&gt;
Please comment me your suggestions for my posts..&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/1302035809932758569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/07/creating-single-field-as-primary-key-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1302035809932758569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/1302035809932758569'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/07/creating-single-field-as-primary-key-in.html' title='Creating single field as Primary key in AX 2012'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total><georss:featurename>Dubai - United Arab Emirates</georss:featurename><georss:point>25.271139 55.307485</georss:point><georss:box>24.8116565 54.675771 25.7306215 55.939199</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3099421127115759789.post-4572656616485243440</id><published>2012-02-26T13:11:00.001+05:30</published><updated>2012-02-26T17:53:10.220+05:30</updated><title type='text'>Initialize the query in the report</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;We will assume the table as AssetTable( where the report is based on AssetTable), then write the code in init() method as&lt;br /&gt;
public void init()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(this.args().dataset() == TableNum(AssetTable))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssetTable = this.args().record();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; super();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Write the InitQuery() to initialize the query which is as follows..&lt;br /&gt;
&lt;br /&gt;
public Query initQuery(Query _query)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; QueryBuildRange range;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query = _query;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (AssetTable)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range = query.dataSourceTable(tablenum(AssetTable)).findRange(fieldnum(AssetTable,AssetId));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!range)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range = query.dataSourceTable(tablenum(AssetTable)).addRange(fieldnum(AssetTable,AssetId));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range.value(AssetTable.AssetId);&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
SysQuery::findOrCreateRange(query.dataSourceTable(tablenum(AssetTable)), fieldnum(AssetTable, Assetid)).value(queryvalue(AssetTable.AssetId));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return query;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Now fi you call this specified report from the form which is based on Asset Table, then the report will run for specific Asset number.&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;To avoid the usage data when called from Fixed Assets form(This will stop the usage data updates)&lt;br /&gt;
public boolean mustLoadSaveQuery()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (AssetTable)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
Thanks, and hope It will helps you.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamics-ax-prasankumar.blogspot.com/feeds/4572656616485243440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/02/initialize-query-in-report.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4572656616485243440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3099421127115759789/posts/default/4572656616485243440'/><link rel='alternate' type='text/html' href='http://dynamics-ax-prasankumar.blogspot.com/2012/02/initialize-query-in-report.html' title='Initialize the query in the report'/><author><name>Prasan</name><uri>http://www.blogger.com/profile/12994242712106741793</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>