<?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-7061588288131344016</id><updated>2026-10-18T08:19:23.559+00:00</updated><category term="Sample code"/><category term="Dynamics AX 2012"/><category term="Ax2012"/><category term="Ax 2012"/><category term="X++"/><category term="AIF"/><category term="Code"/><category term="Documentation"/><category term="Dynamics AX2012"/><category term="Dimensions"/><category term="Ebooks"/><category term="Interview Points"/><category term="Ax2012 R2"/><category term="AX frameworks"/><category term="Ax 2012 vpc"/><category term="SSRS"/><category term="AX2009 Certifications"/><category term="Integrations"/><category term="Layers"/><category term="Monitoring"/><category term="forms"/><category term="print management"/><category term="requirements"/><category term="updates"/><category term="upgrade"/><title type='text'>Explore Dynamics World With Krishh</title><subtitle type='html'>This is all about Microsoft Dynamics AX(formerly known as Axapta). This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use as well future changes.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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>185</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7061588288131344016.post-1713646521504087532</id><published>2022-05-23T11:56:00.006+00:00</published><updated>2022-05-23T11:56:52.719+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'></title><content type='html'>&lt;p&gt;&lt;b&gt;&amp;nbsp;Create the User into ActiveDirectory&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;
CreateADUSER(Args _args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
System.DirectoryServices DirectoryServices;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
System.DirectoryServices.AccountManagement AccountManagement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
System.DirectoryServices.AccountManagement.UserPrincipal up;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
System.DirectoryServices.AccountManagement.PrincipalContext pricipalContext;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;str&lt;/span&gt;&lt;/b&gt; networkDomain=&lt;span style=&quot;color: darkred;&quot;&gt;&quot;KrishhDAX&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
InteropPermission&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
permission;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;try&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
permission = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt; InteropPermission(InteropKind::CLRInterop);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
permission.assert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
pricipalContext = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;
System.DirectoryServices.AccountManagement.PrincipalContext(System.DirectoryServices.AccountManagement.ContextType::Domain,
&lt;span style=&quot;color: darkred;&quot;&gt;&quot;KRISHHDAX&quot;&lt;/span&gt;, &lt;span style=&quot;color: darkred;&quot;&gt;&quot;OU=mDK,OU=Users,OU=TestOU,DC=KrishhDAX,DC=com&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Sometimes we need to connect to AD using
service/admin account credentials, in that case the above line of code will be
as below&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//pricipalContext = new
PrincipalContext(ContextType.Domain, &quot;yourdomain.com&quot;,
&quot;OU=TestOU,DC=yourdomain,DC=com&quot;,&quot;YourAdminUser&quot;,&quot;YourAdminPassword&quot;);&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;
System.DirectoryServices.AccountManagement.UserPrincipal(pricipalContext);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_SamAccountName(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;krishh&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_DisplayName(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;krishh Reddy&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_EmailAddress(&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;a href=&quot;mailto:krishh.009@VALHALLA.com&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;krishh.009@&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: 10.6667px;&quot;&gt;KRISHHDAX&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;a href=&quot;mailto:krishh.009@VALHALLA.com&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;.com&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_GivenName(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;krishh Reddy&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_UserPrincipalName(&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;a href=&quot;mailto:krishh.009@de.deh.dk&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;krishh.009@&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: 10.6667px;&quot;&gt;KRISHHDAX.com&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_Name(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;Krishh&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_Surname(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;Reddy&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.set_Description(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;User Created for
testing&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;up.set_Enabled(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;True&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;up.SetPassword(&lt;span style=&quot;color: darkred;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: darkred; font-size: 10.6667px;&quot;&gt;KRISHHDAX&lt;/span&gt;&lt;span style=&quot;color: darkred;&quot;&gt;#&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
up.Save();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;// info(strFmt(&quot;User Created
%1&quot;,up.get_DisplayName()));&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
CodeAccessPermission::revertAssert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;catch&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;(Exception::CLRError)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
CodeAccessPermission::revertAssert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
info(CLRInterop::getLastException().ToString());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1713646521504087532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2022/05/the-user-into-activedirectory-static.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1713646521504087532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1713646521504087532'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2022/05/the-user-into-activedirectory-static.html' title=''/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-7827949765189677615</id><published>2018-10-22T14:45:00.002+00:00</published><updated>2018-10-22T14:45:58.717+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Splitting dimension into dimension columns in SQL.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Getting dimension into splitted values&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;For ledger dimension&lt;/b&gt;&lt;br /&gt;
Select Dimension,MainAccount,Claims,Functions,ItemGroup,CostCenter,Market_IC,MTO,Projects,Vendor,Agreement from&lt;br /&gt;
&amp;nbsp;(&lt;br /&gt;
&amp;nbsp;select DIMENSIONATTRIBUTEVALUECOMBINATION.recid as dimension,DimensionAttribute.name,DimensionAttributeLevelValueAllView.DisplayValue from DIMENSIONATTRIBUTEVALUECOMBINATION&lt;br /&gt;
&amp;nbsp;join DimensionAttributeLevelValueAllView on DimensionAttributeLevelValueAllView.VALUECOMBINATIONRECID = DIMENSIONATTRIBUTEVALUECOMBINATION.RECID&lt;br /&gt;
&amp;nbsp;join DimensionAttribute on DIMENSIONATTRIBUTE.RecId = DimensionAttributeLevelValueAllView.DIMENSIONATTRIBUTE&lt;br /&gt;
&amp;nbsp;where DIMENSIONATTRIBUTEVALUECOMBINATION.MAINACCOUNT!=0&lt;br /&gt;
&amp;nbsp;) d&lt;br /&gt;
PIVOT&lt;br /&gt;
(&lt;br /&gt;
&amp;nbsp;MAX(DisplayValue)&lt;br /&gt;
&amp;nbsp;FOR Name&lt;br /&gt;
&amp;nbsp;IN (MainAccount,Claims,Functions,ItemGroup,CostCenter,Market_IC,MTO,Projects,Vendor,Agreement)&lt;br /&gt;
)&lt;br /&gt;
AS PivotTable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;select&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DefaultDimension&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Claims&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Functions&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ItemGroup&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;CostCenter&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Market_IC&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;MTO&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Projects&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Vendor&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Agreement &lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;select&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DIMENSIONATTRIBUTEVALUECOMBINATION&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;recid as&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 12.6667px;&quot;&gt;DefaultDimension&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;DimensionAttribute&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;DimensionAttributeValueSetItem&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;DisplayValue &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;
DIMENSIONATTRIBUTEVALUECOMBINATION&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;join&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DimensionAttributeValueSet &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
DimensionAttributeValueSet&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;RecId &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; DIMENSIONATTRIBUTEVALUECOMBINATION&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;RECID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;join&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DimensionAttributeValueSetItem &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
DimensionAttributeValueSetItem&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;DIMENSIONATTRIBUTEVALUESET
&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; DimensionAttributeValueSet&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;RecID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;join&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DimensionAttributeValue &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
DimensionAttributeValue&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;RECID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; DimensionAttributeValueSetItem&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;DIMENSIONATTRIBUTEVALUE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;join&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
DimensionAttribute &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt; DIMENSIONATTRIBUTE&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;RecId &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;
DimensionAttributeValue&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;DIMENSIONATTRIBUTE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;where
DIMENSIONATTRIBUTEVALUECOMBINATION.MAINACCOUNT=0&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;)&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
d&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;PIVOT&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;MAX&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;DisplayValue&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;FOR&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;IN&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;Claims&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Functions&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;ItemGroup&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;CostCenter&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Market_IC&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;MTO&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Projects&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Vendor&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;Agreement&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;)&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;AS&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas; font-size: 9.5pt; mso-ansi-language: EN-US;&quot;&gt;
PivotTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/7827949765189677615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2018/10/splitting-dimension-into-dimension.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/7827949765189677615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/7827949765189677615'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2018/10/splitting-dimension-into-dimension.html' title='Splitting dimension into dimension columns in SQL.'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-8572048545160755982</id><published>2018-08-24T09:44:00.001+00:00</published><updated>2018-08-24T12:46:44.805+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012 R2"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Useful X++ functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
//Return the value from the xmlNode&lt;br /&gt;
&lt;b&gt;static str getXmlNodeValue(XmlNode _node)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Text.RegularExpressions.Regex re =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // BP deviation documented&lt;br /&gt;
&amp;nbsp; &amp;nbsp; new System.Text.RegularExpressions.Regex(&#39;^[ \r\n\t]*((.|\n)*?)[ \r\n\t]*$&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Text.RegularExpressions.Match m = re.Match(_node.text());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; result = m.Result(&#39;$1&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// Provides a lookup of dimension values.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_ctrl&quot;&amp;gt;The control to provide a lookup for.&amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_dimensionName&quot;&amp;gt;The dimension attribute to filter by.&amp;lt;/param&amp;gt;&lt;br /&gt;
&lt;b&gt;public static client void lookupDimension(FormStringControl _ctrl, Name _dimensionName)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysTableLookup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sysTableLookup = SysTableLookup::newParameters(tablenum(DimensionAttribute),_ctrl);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Query&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;query = new Query();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; QueryBuildDataSource&amp;nbsp; &amp;nbsp; queryBuildDataSource = query.addDataSource(tablenum(DimensionAttribute));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysTableLookup.addLookupfield(fieldnum(DimensionAttribute, Name));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; queryBuildDataSource.addRange(fieldnum(DimensionAttribute, Type)).value(queryNotValue(DimensionAttributeType::MainAccount));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysTableLookup.parmQuery(query);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysTableLookup.performFormLookup();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// This method has the complete source file as input and will concatenate the target path with the filename&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_sourceFilename&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; This is the full filename including the path&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_targetPath&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; the target folder&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; It will return the target filename.&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;static filename getTargetFilename(Filename _sourceFilename, Filepath _targetPath)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Filename&amp;nbsp; &amp;nbsp; targetFilename;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; new InteropPermission(InteropKind::ClrInterop).assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; targetFilename = System.IO.Path::Combine(_targetPath, System.IO.Path::GetFileName(_sourceFilename));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return targetFilename;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate nodes into container.&lt;br /&gt;
&lt;b&gt;static container containerFromXMLNode(XmlNode n)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container retval, containerToInsert;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Common recordToInsert;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XmlNamedNodeMap attrs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XmlNode typeAttr, element, recordNode, containerNode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int elemNo = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //validate arguments before using them&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (n == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return retval;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Collect all the elements ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; element = n.firstChild();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (element.name() == &#39;container&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element = element.firstChild();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (element)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attrs = element.attributes();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (attrs)&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; typeAttr = attrs.getNamedItem(&#39;type&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (typeAttr.nodeValue())&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; case &#39;int&#39;&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; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, str2int(BisTools::getXmlNodeValue(element)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;str&#39;&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; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, BisTools::getXmlNodeValue(element));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;real&#39;&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; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, str2num(BisTools::getXmlNodeValue(element)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;enum&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, str2int(BisTools::getXmlNodeValue(element)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;date&#39;&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; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, str2date(BisTools::getXmlNodeValue(element), 321));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;record&#39;&amp;nbsp; &amp;nbsp;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recordNode = element.firstChild();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recordToInsert = Global::recordFromXMLNode(recordNode);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, recordToInsert);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;container&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; containerNode = element.firstChild();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; containerToInsert = BisTools::containerFromXMLNode(containerNode);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, containerToInsert);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &#39;blob&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; containerToInsert = BinData::stringToData(BisTools::getXmlNodeValue(element));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval = conins(retval, elemNo, containerToInsert);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element = element.nextSibling();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elemNo += 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return retval;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Generate html from Record&lt;br /&gt;
&lt;b&gt;static str record2html(Common record)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str html;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictTable&amp;nbsp; &amp;nbsp;dictTable = new dictTable(record.TableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictField&amp;nbsp; &amp;nbsp;dictField;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldId&amp;nbsp; &amp;nbsp; &amp;nbsp;fieldId;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void addField2html(str fieldName, anyType fieldValue, str htmlCode, str fieldLabel)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str newValue = strFmt(&#39;%1&#39;,fieldValue);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (newValue == &#39;&#39;)&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; newValue = &#39;-&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; html += strFmt(&#39;&amp;lt;tr&amp;gt;&amp;lt;td width=30%&amp;gt;%3%4&amp;lt;/td&amp;gt;&amp;lt;td width=50%&amp;gt;%3%2&amp;lt;/td&amp;gt;&amp;lt;td width=20%&amp;gt;%3%1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#39;,fieldName, newValue , htmlCode, fieldLabel);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; html = &#39;&amp;lt;html&amp;gt;&amp;lt;b&amp;gt;Record values&amp;lt;table border width=100%&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; addField2html(&#39;Field name&#39;,&#39;Value&#39;,&#39;&amp;lt;b&amp;gt;&#39;,&#39;Label&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldId = dictTable.fieldNext(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (fieldId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dictField = dictTable.fieldObject(fieldId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dictField.arraySize() == 1 &amp;amp;&amp;amp; dictField.baseType() != Types::Container &amp;amp;&amp;amp; dictField.baseType() != Types::BLOB)&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; addField2html(dictField.name(), record.(fieldId),&quot;&quot;, dictField.label());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldId = dictTable.fieldNext(fieldId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; html+=&#39;&amp;lt;/table&amp;gt;&amp;lt;/html&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return html;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Generate record to Text&lt;br /&gt;
&lt;b&gt;static str record2text(Common record)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictTable&amp;nbsp; &amp;nbsp;dictTable = new dictTable(record.TableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictField&amp;nbsp; &amp;nbsp;dictField;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldId&amp;nbsp; &amp;nbsp; &amp;nbsp;fieldId;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void addField2text(str fieldName, anyType fieldValue, str fieldLabel)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str newValue = strFmt(&#39;%1&#39;,fieldValue);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (newValue == &#39;&#39;)&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; newValue = &#39;-&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text += strFmt(&#39;Field \&#39;%1\&#39; = \&#39;%2\&#39;, Label: \&#39;%3\&#39;\n&#39;,fieldName, newValue, fieldLabel);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; text = strFmt(&quot;@BIS635&quot;, tableid2name(record.tableId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; addField2text(&#39;Field name&#39;,&#39;Value&#39;, &#39;Label&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldId = dictTable.fieldNext(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (fieldId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dictField = dictTable.fieldObject(fieldId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dictField.arraySize() == 1)&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; addField2text(dictField.name(), record.(fieldId), dictField.label());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldId = dictTable.fieldNext(fieldId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return text;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Create the table record from xmlnode&lt;br /&gt;
// Input is &amp;lt;Record table=&quot;name&quot;&amp;gt; &amp;lt;Field:field1&amp;gt; value &amp;lt;/Field:field1&amp;gt; ... &amp;lt;/Record&amp;gt;&lt;br /&gt;
// it&#39;s the opposite from record.xml() method&lt;br /&gt;
&lt;b&gt;static Common xml2record(XmlNode n, Common c = null)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tableId table;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldId field;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictTable dt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictField df;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XmlNode fieldNode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str fieldName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Struct content;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str tableName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Types t;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //validate arguments before using them&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (n == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // If we don&#39;t have an incoming buffer, one is created&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (prmisdefault(c))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a buffer of the correct type&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableName = n.name();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// tableName = n.attributes().getNamedItem(&#39;name&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Check if table node can be accessed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tableName != &#39;&#39;)&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; table = tablename2id(tableName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt = new DictTable(table);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c = dt.makeRecord();&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; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table = c.TableId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt = new DictTable(table);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fieldNode = n.firstChild();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (fieldNode)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldName = fieldNode.attributes().getNamedItem(&#39;name&#39;).text();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field = dt.fieldName2Id(fieldName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df = new DictField(table, field);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t = df.baseType();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (t == Types::Enum) //Enums need to be treated as Integers. By defult, Enums are getting treated as a boolean and hence loosing its value.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t = Types::Integer;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; content = BisTools::valueFromXMLNode (t, fieldNode);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.(field) = content.value(&#39;value&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldNode = fieldNode.nextSibling();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return c;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//Get next working date from the date .&lt;br /&gt;
&lt;b&gt;public static date GetNextWorkDay(date _fromDate)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WorkCalendarDate&amp;nbsp; &amp;nbsp; workCalendar;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select firstOnly TransDate from workCalendar&lt;br /&gt;
&amp;nbsp; &amp;nbsp; order by TransDate ASC&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where workCalendar.TransDate &amp;gt; _fromDate&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; workCalendar.WorkTimeControl == WorkTimeControl::Open;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return workCalendar.TransDate;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Attempts to find executatble for file type specified, and open file with it.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_filename&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;File name to show&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
&lt;b&gt;public static client void showFile(Filename _filename)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str filePath, fileName, fileExt, executable;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (System.IO.File::Exists(_filename))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [filePath, filename, fileExt] = fileNameSplit(_filename);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; executable = WinAPI::findExecutable(_filename);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!executable)&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; error(strFmt(&quot;Windows were not able to find executable for file %1&quot;, _filename));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileExt == &#39;.msg&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WinAPI::shellExecute(strFmt(&#39;&quot;%1&quot;&#39;, executable),strFmt(&#39;/f &quot;%1&quot;&#39;, _filename),strFmt(&#39;&quot;%1&quot;&#39;, filePath)); // outlook requires extra parameter&amp;nbsp; /f&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WinAPI::shellExecute(strFmt(&#39;&quot;%1&quot;&#39;, executable),strFmt(&#39;&quot;%1&quot;&#39;, _filename),strFmt(&#39;&quot;%1&quot;&#39;, filePath));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(&quot;File not found&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Converts enum value to enum label in language specified&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;enumId&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Enum Id&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;value&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Enum value&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;languageId&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Language for label&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Label of enum value in language specified&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static str enum2Label(EnumId enumId, int value, LanguageId languageId = SrsReportRunUtil::getCurrentUserLangId())&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictEnum dictEnum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int&amp;nbsp; &amp;nbsp; &amp;nbsp; valueIndex, valueBuf;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dictEnum = new DictEnum(enumId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dictEnum)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (valueIndex = 0 ; valueIndex &amp;lt; dictEnum.values(); valueIndex++)&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; valueBuf = dictEnum.index2Value(valueIndex);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (valueBuf == value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return SysLabel::labelId2String(dictEnum.index2LabelId(valueIndex), languageId);&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 &#39;&#39;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Converts time value into string with hours and minutes. Mostly used when generating file names&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;time&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Time as integer&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Time converted to string in format HHMM&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static TempStr time2StrHM(int time)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return num2str( time div 3600&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,2,0,0,0) + num2Str0(time mod 3600 div 60,2,0,0,0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Converts any value to string. This is hardcoded conversion without using culture context&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_value&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;The value to convert&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Converted value as string&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static str any2String(anytype _value)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; switch(typeOf(_value))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // BP deviation documented&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::Date: return date2str(_value, -1,-1,-1,-1,-1,-1,DateFlags::None);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::Time: return KrishhUtils::time2StrHM(_value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::Int64, Types::Integer: return int2str(_value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::Real: return strFmt(&#39;%1&#39;, _value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::Enum: return strFmt(&#39;%1&#39;, _value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types::UtcDateTime: return DateTimeUtil::toStr(DateTimeUtil::applyTimeZoneOffset(_value, DateTimeUtil::getUserPreferredTimeZone())); // Hotfix 52&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default: return strFmt(&#39;%1&#39;, _value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return &quot;&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Checks full path, and if \ is missing at the end - adds it&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;path&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Full path to analyse&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Full path with \ at the end&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static str fixPath(str path)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str buf = strLRTrim(path);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!path)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (subStr(buf, strLen(buf),1) != &#39;\\&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; buf = buf + &#39;\\&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return buf;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Generates temporrary file with extension. Also creates file and saves it.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;filePrefix&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;File prefix to use&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;extension&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Extension to use&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;filePath&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;File path to use&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Created temporrary file name&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
/// &amp;lt;remarks&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Creates empty file with unique name. Safe to use with multiple threads&lt;br /&gt;
/// &amp;lt;/remarks&amp;gt;&lt;br /&gt;
/// &amp;lt;exception cref=&quot;Exception::Error&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;When 10 attempts to create file failed&lt;br /&gt;
/// &amp;lt;/exception&amp;gt;&lt;br /&gt;
/// &amp;lt;exception cref=&quot;Exception::Error&quot;&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;When 10 attempts to create file failed&lt;br /&gt;
/// &amp;lt;/exception&amp;gt;&lt;br /&gt;
&lt;b&gt;public static str getTempFile(str filePrefix, str extension, str filePath = &#39;&#39;)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpPath;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.IO.FileStream fileStream;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ok;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (filePath)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpPath = KrishhUtils::fixPath(filePath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new InteropPermission(InteropKind::ClrInterop).assert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpPath = System.IO.Path::GetTempPath();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while(!ok)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = tmpPath + (filePrefix?filePrefix:filePrefix + guid2str(newGuid())) + extension; // First attempt direct&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new InteropPermission(InteropKind::ClrInterop).assert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(System.IO.File::Exists(fileName))&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; fileName = tmpPath + filePrefix + guid2str(newGuid()) + extension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&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; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (i&amp;gt;10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw Exception::Error;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new FileIOPermission(fileName, #IO_WRITE).assert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileStream = System.IO.File::Create(fileName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileStream.Dispose();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ok = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception::Error)&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; throw error(&quot;@SYS326095&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch&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; exceptionTextFallThrough();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return fileName;&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
///&amp;nbsp; &amp;nbsp; &amp;nbsp;Returns the number associated with the specified month name.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;_monthName&quot;&amp;gt;&lt;br /&gt;
/// The name of the month.&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
/// The number associated with the month name.&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static int monthUSName2Num(str _monthName)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int ret;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str monthName = _monthName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month1(&#39;january&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.jan(&#39;jan&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month2(&#39;february&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.feb(&#39;feb&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month3(&#39;march&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.mar(&#39;mar&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month4(&#39;april&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.apr(&#39;apr&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month5(&#39;may&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month6(&#39;june&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.jun(&#39;jun&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month7(&#39;july&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.jul(&#39;jul&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month8(&#39;august&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.aug(&#39;aug&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month9(&#39;september&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.sep(&#39;sep&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month10(&#39;october&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.oct(&#39;oct&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month11(&#39;november&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.nov(&#39;nov&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.month12(&#39;december&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Define.dec(&#39;dec&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; monthName = strLwr(_monthName);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; switch(monthName)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month1:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #jan:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month2:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #feb:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case&amp;nbsp; #month3:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #mar:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month4:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #apr:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month5:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month6:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #jun:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month7:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #jul:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month8:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #aug:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 8;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month9:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #sep:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month10:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #oct:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month11:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #nov:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 11;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #month12:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #dec:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 12;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/8572048545160755982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2018/08/useful-x-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8572048545160755982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8572048545160755982'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2018/08/useful-x-functions.html' title='Useful X++ functions'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-3173167001316402645</id><published>2018-08-24T09:33:00.001+00:00</published><updated>2018-08-24T09:33:27.467+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Get DimensionAttribute by providing the dimensionnumber</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
public static dimensionAttribute getDimensionByNumber(int _dimensionNumber)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RecId companyLedger =&amp;nbsp; Ledger::findByLegalEntity(CompanyInfo::findDataArea(curext()).RecId).RecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttribute dimensionAttribute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Query query = new Query();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; QueryBuildDataSource qbd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; QueryRun qr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (! _dimensionNumber)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return dimensionAttribute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd = query.addDataSource(tableNum(dimensionAttribute));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.fields().dynamic(false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.fields().addField(fieldNum(dimensionAttribute, Name));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.addOrderByField(fieldNum(dimensionAttribute, Name));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.addGroupByField(fieldNum(dimensionAttribute, Name));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.addRange(fieldNum(dimensionAttribute, RecId)).value(queryNotValue(DimensionAttribute::getMainAccountDimensionAttribute()));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd = qbd.addDataSource(tableNum(dimensionHierarchyLevel));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.fields().dynamic(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.relations(true);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd = qbd.addDataSource(tableNum(ledgerStructure));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.relations(false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.addLink(fieldNum(dimensionHierarchyLevel, DimensionHierarchy), fieldNum(ledgerStructure, DimensionHierarchy));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qbd.addRange(fieldNum(ledgerStructure, Ledger)).value(queryvalue(companyLedger));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qr = new QueryRun(query);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qr.enablePositionPaging(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; qr.addPageRange(_dimensionNumber,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (qr.next())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dimensionAttribute = qr.getNo(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return dimensionAttribute;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/3173167001316402645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2018/08/get-dimensionattribute-by-providing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3173167001316402645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3173167001316402645'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2018/08/get-dimensionattribute-by-providing.html' title='Get DimensionAttribute by providing the dimensionnumber'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-8084227265586839790</id><published>2018-05-30T13:04:00.001+00:00</published><updated>2018-05-30T13:04:27.511+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012 R2"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Create Non clusterindex in Ax with include keyword.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;Create non clustered index with &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;include keyword suggestion given by query plan&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;u&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/u&gt;&amp;nbsp;Index with Included Columns&lt;br /&gt; You  can extend the functionality of nonclustered indexes by adding nonkey  columns to the leaf level of the nonclustered index. By including nonkey  columns, you can create nonclustered indexes that cover more queries.  This is because the nonkey columns have the following benefits:&lt;br /&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; They can be data types not allowed as index key columns.&lt;br /&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; They are not considered by the Database Engine when calculating the number of index key columns or index key size.&lt;br /&gt; An  index with included nonkey columns can significantly improve query  performance when all columns in the query are included in the index  either as key or nonkey columns. Performance gains are achieved because  the query optimizer can locate all the column values within the index;  table or clustered index data is not accessed resulting in fewer disk  I/O operations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;Issue&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; Whenever a synchronization is done, AX overwrites the indexes which we put through SQL&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;Resolution&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; a. Created the index via AX as a table method&lt;br /&gt;
&lt;br /&gt;&lt;br /&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;&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;b&gt;public&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&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&gt;&lt;/span&gt;&lt;b&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;static&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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&gt;&lt;/span&gt;&lt;b&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;server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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&gt;&lt;/span&gt;&lt;b&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;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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; createSqlIndexes()&lt;/span&gt;&lt;/span&gt;&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&gt;&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;    SqlStatementExecutePermission SqlStatementExecutePermission;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;b&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;str&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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; createIndexSql;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/span&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: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: xx-small;&quot;&gt;Connection connection=&lt;/span&gt;&lt;/span&gt;&lt;b&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;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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; Connection();&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&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&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: Consolas; font-size: xx-small;&quot;&gt;    Statement statement=connection.createStatement();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&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: Consolas; font-size: xx-small;&quot;&gt;
createIndexSql=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&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: Consolas; font-size: xx-small;&quot;&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;@&quot;IF EXISTS(select * from sys.indexes where object_id=OBJECT_ID(N&#39;[dbo].[InventDIM]&#39;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;    AND NAME=N&#39;sonIdx&#39; )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;
DROP INDEX [sonIdx] on [dbo].[InventDIM] WITH (ONLINE=OFF)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;
CREATE NONCLUSTERED INDEX [sonIdx] ON [dbo].[INVENTDIM] ([INVENTBATCHID],[WMSLOCATIONID],[INVENTSERIALID],[INVENTSIZEID],[INVENTCOLORID],[INVENTGTDID_RU],[INVENTPROFILEID_RU],[INVENTOWNERID_RU],[INVENTSTYLEID],[LICENSEPLATEID],[INVENTSTATUSID],[DATAAREAID],[PARTITION],[INVENTLOCATIONID],[CONFIGID],[INVENTSITEID])&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;
INCLUDE ([INVENTDIMID])&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;
&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: darkred; font-family: Consolas; font-size: xx-small;&quot;&gt;WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&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&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&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&gt;&lt;/span&gt;&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;    SqlStatementExecutePermission=&lt;/span&gt;&lt;/span&gt;&lt;b&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;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&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; SqlStatementExecutePermission(createIndexSql);&lt;/span&gt;&lt;/span&gt;&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;
SqlStatementExecutePermission.assert();&lt;br /&gt;

statement.executeUpdate(createIndexSql);&lt;br /&gt;

CodeAccessPermission::revertAssert();&lt;br /&gt;


}&lt;br /&gt;
&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;
Execute this code in the application class dbsynchronize method at the end of the method after standard dbsynch done. so that we will have an sql index.&lt;/h4&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;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/8084227265586839790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2018/05/create-non-clusterindex-in-ax-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8084227265586839790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8084227265586839790'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2018/05/create-non-clusterindex-in-ax-with.html' title='Create Non clusterindex in Ax with include keyword.'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-6122202327016211538</id><published>2017-07-17T11:14:00.003+00:00</published><updated>2017-07-17T11:14:52.766+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012 R2"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Read xml file with namespace</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
static void krishh_samplexmlread(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlNode root;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlNode book;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlNodeList books;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlNamespaceManager nsmgr;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlDocument doc = new XmlDocument();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int i=1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; doc.Load(@&quot;C:\Temp\book.xml&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Create an XmlNamespaceManager for resolving namespaces.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; nsmgr = new XmlNamespaceManager(doc.NameTable());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; nsmgr.AddNamespace(&quot;bk&quot;, &quot;urn:samples&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Select the book node with the matching attribute value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; root = doc.DocumentElement();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; books = root.selectNodes(&quot;descendant::book&quot;, nsmgr);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; books.length(); i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;book = books.item(i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(book.selectSingleNode(&quot;bk:first-name&quot;).text());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(book.selectSingleNode(&quot;bk:last-name&quot;).text());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;!-- A fragment of a book store inventory database --&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;bookstore xmlns:bk=&quot;urn:samples&quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;book bk:ISBN=&quot;1-861001-57-8&quot; publicationdate=&quot;1997&quot; genre=&quot;novel&quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;title&amp;gt;Pride And Prejudice&amp;lt;/title&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;first-name&amp;gt;Jane&amp;lt;/first-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;last-name&amp;gt;Austen&amp;lt;/last-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;price&amp;gt;24.95&amp;lt;/price&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/book&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;book bk:ISBN=&quot;1-861002-30-1&quot; publicationdate=&quot;1992&quot; genre=&quot;novel&quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;title&amp;gt;The Handmaid&#39;s Tale&amp;lt;/title&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;first-name&amp;gt;Margaret&amp;lt;/first-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;last-name&amp;gt;Atwood&amp;lt;/last-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;price&amp;gt;29.95&amp;lt;/price&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/book&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;book bk:ISBN=&quot;1-861001-57-6&quot; publicationdate=&quot;1991&quot; genre=&quot;novel&quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;title&amp;gt;Emma&amp;lt;/title&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;first-name&amp;gt;Jane&amp;lt;/first-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;last-name&amp;gt;Austen&amp;lt;/last-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;price&amp;gt;19.95&amp;lt;/price&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/book&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-&amp;lt;book bk:ISBN=&quot;1-861001-45-3&quot; publicationdate=&quot;1982&quot; genre=&quot;novel&quot;&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;title&amp;gt;Sense and Sensibility&amp;lt;/title&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//-&amp;lt;author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;first-name&amp;gt;Jane&amp;lt;/first-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;last-name&amp;gt;Austen&amp;lt;/last-name&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/author&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;price&amp;gt;19.95&amp;lt;/price&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/book&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
//&amp;lt;/bookstore&amp;gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/6122202327016211538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/07/read-xml-file-with-namespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6122202327016211538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6122202327016211538'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/07/read-xml-file-with-namespace.html' title='Read xml file with namespace'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-1219577075117518416</id><published>2017-04-20T10:14:00.001+00:00</published><updated>2017-04-20T10:14:19.427+00:00</updated><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="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><title type='text'>AX2012 Run AIF Single Message manually</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Execute single message for inbound without executing all inbound ports.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;class Krishh_InboundParallelMsgProcessPerMsgId extends AifInboundParallelMsgProcess&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RecId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gatewayQueueRecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgfRecId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifMessageId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;messageId;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
protected Object dialog()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogRunbase &amp;nbsp; &amp;nbsp; &amp;nbsp; dialogRunbase;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogRunbase &amp;nbsp; = super();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogRunbase.caption(AifInboundParallelMsgProcess::description());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogRunbase.addText(&quot;Runbase framework doesnt allow Guid type fields&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogRunbase.addText(&quot;reference field shows the gatewayqueue record&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgfRecId &amp;nbsp; = dialogRunbase.addField(extendedTypeStr(AifGatewayQueueRecId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgfRecId.lookupButton(2);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return dialogRunbase;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public AifGatewayQueue findGatewayQueue(RecId &amp;nbsp;_recId)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifGatewayQueue &amp;nbsp; &amp;nbsp; aifGatewayQueue;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select aifGatewayQueue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifGatewayQueue.RecId == _recId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return aifGatewayQueue;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public boolean getFromDialog()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean ret;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ret = super();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; gateWayQueueRecId = dlgfRecId.value();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public AifMessageId parmMessageId(AifMessageId _messageId = messageId)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; messageId = _messageId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return messageId;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void run()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (gatewayQueueRecId != 0 &amp;amp;&amp;amp; messageId == emptyGuid())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; messageId = this.findGatewayQueue(gateWayQueueRecId).MessageId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&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; if (messageId != emptyGuid())&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; this.runSingleMsgId(messageId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AifQueueManager::createQueueManagerData();&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; throw error (&quot;invalid message id please enter valid messageid&quot;);&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; ttsCommit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; catch&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;process has been aborted&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
private void runSingleMsgId(AifMessageId &amp;nbsp; &amp;nbsp;_messageId)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifGatewayQueue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gatewayQueue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifInboundMsgProcess &amp;nbsp; &amp;nbsp;inboundMsgProcess;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifResourceLockId &amp;nbsp; &amp;nbsp; &amp;nbsp; resourceLockId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; setprefix(classstr(InboundParallelMsgProcessPerMsgId) + &#39;-&#39; + methodstr(Krishh_InboundParallelMsgProcessPerMsgId&amp;nbsp;, run));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select firstOnly gatewayQueue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where gatewayQueue.MessageId == _messageId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (gatewayQueue)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resourceLockId = AifResourceLock::lockResource(guid2str(gatewayQueue.MessageId),&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AifResourceType::Message,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AifResourceLockType::DocumentService);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Process message only if lock is created.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(resourceLockId)&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; AifResourceIdMap::createMsgResourceMap(guid2str(gatewayQueue.MessageId), gatewayQueue.MessageId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // remember selected record&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inboundMsgProcess = new AifInboundMsgProcess(gatewayQueue.data(), resourceLockId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inboundMsgProcess.run();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public boolean validate(Object calledFrom = null)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ret = super(calledFrom);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (this.findGatewayQueue(gateWayQueueRecId).RecId == 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;Queue not found&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static&amp;nbsp;Krishh_InboundParallelMsgProcessPerMsgId&amp;nbsp;construct()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return new&amp;nbsp;Krishh_InboundParallelMsgProcessPerMsgId&amp;nbsp;();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static void main(Args args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;Krishh_InboundParallelMsgProcessPerMsgId&amp;nbsp;inboundParallelMsgProcessPerMsgId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; inboundParallelMsgProcessPerMsgId =&amp;nbsp;Krishh_InboundParallelMsgProcessPerMsgId&amp;nbsp;::construct();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (inboundParallelMsgProcessPerMsgId.prompt())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inboundParallelMsgProcessPerMsgId.run();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1219577075117518416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-run-aif-single-message-manually.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1219577075117518416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1219577075117518416'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-run-aif-single-message-manually.html' title='AX2012 Run AIF Single Message manually'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-2700999695724183888</id><published>2017-04-20T09:30:00.004+00:00</published><updated>2017-04-20T09:30:28.867+00:00</updated><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="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Actiavte/Deactivate Ports using X++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
create enum 1. AIFPortActivorDeactive &amp;nbsp;with Acivate,Decativate as enumvalues.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2. AIF portType with inbound and Outbound as enumvalues.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;class krishhAIFPortsUtil extends RunBaseBatch&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Map serviceStatusMap;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Map portWsdlUrlMap;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AIFPortActivorDeactive portActiveorDeactive;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AIFPortType aifPortType;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; dlgActiveorDeactive;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; dlgaifPortType;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define.CurrentVersion(1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define.Version1(1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #localmacro.CurrentList&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; portActiveorDeactive,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifPortType&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #endmacro&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;private void deployInboundPort(AifInboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startLengthyOperation();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AifPortManager::deployPort(port.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.updateServiceHostStatus();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endLengthyOperation();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;private void deployOutboundPort(AifOutboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; startLengthyOperation();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifPortManager::deployPort(port.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; endLengthyOperation();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public Object dialog()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogRunbase &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog = super();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #resAppl&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgActiveorDeactive=dialog.addField(enumStr(AIFPortActivorDeactive), &quot;Activate/Deactivate&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgaifPortType=dialog.addField(enumStr(AIFPortType), &quot;PortType&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return dialog;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public boolean getFromDialog()&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; portActiveorDeactive=dlgActiveorDeactive.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; aifPortType=dlgaifPortType.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return super();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;str getPortRuntimeError(AifInboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str serviceTypeName, status;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean isPortStarted = false;&lt;br /&gt;
#Aif&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (port.Deployed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceTypeName = strFmt(&#39;%1.%2&#39;, #DotNetServiceNamespace, port.Name);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!serviceStatusMap)&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; // If the map is null, then the IL appDomain does not exist and services are not available&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = strFmt(&quot;@SYS345108&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (serviceStatusMap.exists(serviceTypeName))&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; status = serviceStatusMap.lookup(serviceTypeName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isPortStarted = strStartsWith(status, #WcfCommunicationState_Opened);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return isPortStarted?&quot;&quot;:status;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// BP deviation documented&lt;br /&gt;
&lt;b&gt;str getPortWsdlUrl(AifInboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str wsdlUrl = &#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifPortName portName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifWcfAdapter wcfAdapter;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (port.Deployed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; portName = port.Name;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (portWsdlUrlMap.exists(portName))&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; wsdlUrl = portWsdlUrlMap.lookup(portName);&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; wcfAdapter = AifWcfAdapter::getWcfAdapterForPort(port);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (wcfAdapter != null)&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; wsdlUrl = wcfAdapter.getWsdlUrl(port.ChannelId, port.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; portWsdlUrlMap.insert(portName, wsdlUrl);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return wsdlUrl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// BP deviation documented&lt;br /&gt;
&lt;b&gt;boolean isPortRunning(AifInboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str serviceTypeName, status;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean isPortStarted = false;&lt;br /&gt;
#Aif&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (port.Deployed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceTypeName = strFmt(&#39;%1.%2&#39;, #DotNetServiceNamespace, port.Name);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If the map is null, then the IL appDomain does not exist and services are not available&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (serviceStatusMap &amp;amp;&amp;amp; serviceStatusMap.exists(serviceTypeName))&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; status = serviceStatusMap.lookup(serviceTypeName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isPortStarted = strStartsWith(status, #WcfCommunicationState_Opened);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return isPortStarted;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public container pack()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return [#CurrentVersion,#CurrentList];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public boolean unpack(container packedClass)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Version version = RunBase::getVersion(packedClass);&lt;br /&gt;
;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; switch (version)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case #CurrentVersion:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [version,#CurrentList] = packedClass;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public AIFPortType parmAifPortType(AIFPortType _aifPortType = aifPortType)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; aifPortType = _aifPortType;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return aifPortType;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public AIFPortActivorDeactive parmPortActiveorDeactive(AIFPortActivorDeactive _portActiveorDeactive = portActiveorDeactive)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; portActiveorDeactive = _portActiveorDeactive;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return portActiveorDeactive;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public void portinit()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifSetup::initialize();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Register out of the box adapters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifSetup::registerOutOfTheBoxAdapters();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; portWsdlUrlMap = new Map(Types::String, Types::String);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// &amp;nbsp; &amp;nbsp;Contains the code that does the actual job of the class.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;b&gt;public void run()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #OCCRetryCount&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifInboundPort AifInboundPort;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifOutboundPort AifOutboundPort;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.updateServiceHostStatus();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (aifPortType)&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; case AIFPortType::Inbound:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(AIFPortActivorDeactive::Activate==portActiveorDeactive)&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; &amp;nbsp; &amp;nbsp; while select AifInboundPort //where AifInboundPort.PortCategory==AifPortCategory::Enhanced&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; if(this.isPortRunning(AifInboundPort))&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; &amp;nbsp; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.portinit();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.deployInboundPort(AifInboundPort);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(this.getPortRuntimeError(AifInboundPort)!=&quot;&quot;)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;@krishh1896&quot;,AifInboundPort.Name,this.getPortRuntimeError(AifInboundPort)));&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; &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; &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; &amp;nbsp; &amp;nbsp; }&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; else&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; &amp;nbsp; &amp;nbsp; while select AifInboundPort where AifInboundPort.PortCategory==AifPortCategory::Enhanced&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.portinit();&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; &amp;nbsp; &amp;nbsp; this.undeployInboundPort(AifInboundPort);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case AIFPortType::OutBound:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(IFPortActivorDeactive::Activate==portActiveorDeactive)&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; &amp;nbsp; &amp;nbsp; while select AifOutboundPort&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.portinit();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.deployOutboundPort(AifOutboundPort);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; &amp;nbsp; &amp;nbsp; while select AifOutboundPort&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.portinit();&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; &amp;nbsp; &amp;nbsp; this.unDeployOutboundPort(AifOutboundPort);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(strfmt(&quot;@SYS12580&quot;,aifPortType));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&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; catch (Exception::Deadlock)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retry;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; catch (Exception::UpdateConflict)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (appl.ttsLevel() == 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; if (xSession::currentRetryCount() &amp;gt;= #RetryNum)&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; throw Exception::UpdateConflictNotRecovered;&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; else&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; retry;&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; }&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; throw Exception::UpdateConflict;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;private void undeployInboundPort(AifInboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startLengthyOperation();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AifPortManager::undeployPort(port.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.updateServiceHostStatus();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this.clearPortWsdlUrl(port);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endLengthyOperation();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;private void unDeployOutboundPort(AifOutboundPort port)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; startLengthyOperation();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifPortManager::undeployPort(port.Name);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; endLengthyOperation();&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;public void updateServiceHostStatus()&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // If the map is null, then the IL appDomain does not exist and services are not available&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; serviceStatusMap = appl.getServiceHostStatus();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
static&amp;nbsp;krishhAIFPortsUtil&amp;nbsp;construct()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; return new&amp;nbsp;krishhAIFPortsUtil();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;public static void main(Args _args)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;krishhAIFPortsUtil &amp;nbsp;krishhAIFPortsUtil&amp;nbsp;;&lt;/div&gt;
&lt;div&gt;
;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;krishhAIFPortsUtil&amp;nbsp;=&amp;nbsp;krishhAIFPortsUtil &amp;nbsp;::construct();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; if (krishhAIFPortsUtil&amp;nbsp;.prompt())&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;krishhAIFPortsUtil .run();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
public static void mainAutoRun(str _args)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;krishhAIFPortsUtil&amp;nbsp;aifPortsUtil;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; ;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; aifPortsUtil =&amp;nbsp;krishhAIFPortsUtil&amp;nbsp;::construct();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; if (!_args)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; switch(_args)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case(&#39;activate&#39;) :&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifPortsUtil.parmPortActiveorDeactive(AIFPortActivorDeactive::Activate);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case(&#39;deactivate&#39;) :&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifPortsUtil.parmPortActiveorDeactive(AIFPortActivorDeactive::Deactivate);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; aifPortsUtil.run();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/2700999695724183888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-actiavtedeactivate-ports-using-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2700999695724183888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2700999695724183888'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-actiavtedeactivate-ports-using-x.html' title='AX2012 Actiavte/Deactivate Ports using X++'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-3564876992940245516</id><published>2017-04-20T09:17:00.001+00:00</published><updated>2017-04-20T09:17:38.461+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Export ActiveDirectory Data to file.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Created the framework class called ADReader which reads the data from ActiveDirectory of current domains in the nework that connected.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;static void krishh_ADExportToCSV(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AxaptaUserManager mgr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container domainNames;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int domainCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Collections.ArrayList domains = new System.Collections.ArrayList();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TextIo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ioData;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIOPermission permission;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str filename = &quot;c:\\temp\\tmotest_&quot;+FileUtil::createFilenameTimeStamp()+&quot;.csv&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ADReader &amp;nbsp; &amp;nbsp;adReader = new ADReader();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; map costcenter = new Map(types::String, types::String);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str key;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; permission = new FileIOPermission(filename, &amp;nbsp;#io_write);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Open file for writing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ioData = new TextIo(filename, #io_write);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Check file open status&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!ioData)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // File &#39;%1&#39; could not be opened.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(strfmt(&quot;@SYS19312&quot;, filename));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Set file delimiters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ioData.outRecordDelimiter(&#39;\r\n&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ioData.outFieldDelimiter(&#39;;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ioData.write(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Domain&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Company&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Country&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;DepartmentNumber&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;EmployeeType&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Mail&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Manager&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Manager_Converted&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;GivenName&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Sn&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;TelephoneNumber&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;UserId&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;samAccountName&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;EmployeeNumber&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;EmployeeNumber_Converted&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Disabled&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;MemberOf&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;ADGroups&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; mgr = new AxaptaUserManager();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Get the names of the domains from the kernel class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; domainNames = mgr.enumerateDomains(&#39;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(domainNames)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; domainCount = conLen(domainNames);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Add all the domain names to the domains combo box&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // dual loop to sort the domains alphabetically using the default comparator&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(domainCount &amp;gt; 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; domains.Clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(i = 0; i &amp;lt; domainCount; i++)&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 (conPeek(domainNames, i+1) == &quot;Krishhdax.com&quot;)&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; &amp;nbsp; &amp;nbsp; adReader.reset();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adReader.parmSelectedDomainName(conPeek(domainNames, i+1));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(adReader.next())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( &amp;nbsp; adReader.getEmployeeType() == &quot;Employee Master Account&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; || adReader.getEmployeeType() == &quot;Consultant Master Account&quot;)&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.write(&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adReader.parmSelectedDomainName()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getCompany()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getCountry()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getDepartmentNumber()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getEmployeeType()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getMail()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getManager()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , subStr(adReader.getManager()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, strfind(adReader.getManager(), &quot;CN=&quot;, 1, strLen(adReader.getManager()))+3&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, strfind(adReader.getManager(), &quot;,&quot;, strfind(adReader.getManager(), &quot;CN=&quot;, 1, strLen(adReader.getManager())), strLen(adReader.getManager())) - strfind(adReader.getManager(), &quot;CN=&quot;,1 , strLen(adReader.getManager())) - 3&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getGivenName()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getSn()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getTelephoneNumber()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getUserId()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getsamAccountName()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getEmployeeNumber()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , subStr(adReader.getEmployeeNumber(), 4, 255)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , adReader.getDisabled()&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , con2Str(adReader.getMemberOf())&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; , con2Str(adReader.getADGroups())&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; &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; &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; &amp;nbsp; &amp;nbsp; }&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;class ADReader&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.DirectorySearcher &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;directorySearcher;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.SearchResultCollection &amp;nbsp; &amp;nbsp; searchResultCollection;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.SearchResult &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchResult;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.DirectoryEntry &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entry;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.PropertyValueCollection &amp;nbsp; &amp;nbsp;propertyValueCollection;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.SearchScope &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;searchScope;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectedDomainName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prefix;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; criteria;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;filename;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Collections.Specialized.StringCollection &amp;nbsp;propertyList;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.DirectoryServices.PropertyCollection &amp;nbsp; &amp;nbsp; &amp;nbsp;propertyCollection;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;numberOfUsers, currentUserNumber;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; NetworkAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;networkAlias;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Description &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Description &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; department;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Description &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; title;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Email &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mail;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;givenName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; manager, departmentNumber, telephoneNumber, userId, sn, employeeType, employeeNumber, country, samAccountName;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memberOf, adGroups;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; userAccountControl;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;public container getADGroups()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str memberOfStr, searchStr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter pos, posCount;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter posFrom, posTo, searchStrLen;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!ADGroups)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchStr = &#39;CN=&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchStrLen = strLen(searchStr);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posCount = conlen(memberOf);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (Pos=1; pos&amp;lt;=posCount;pos++)&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; memberOfStr = conpeek(memberOf, pos);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posTo = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posFrom = strScan(memberOfStr, searchStr, posTo, strLen(memberOfStr));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (posFrom)&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; posTo = strScan(memberOfStr, &#39;,&#39;, posFrom, strLen(memberOfStr));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ADGroups += [subStr(memberOfStr, posFrom+searchStrLen, posTo-posFrom-searchStrLen)];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posFrom = strScan(memberOfStr, searchStr, posTo, strLen(memberOfStr));&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ADGroups;&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;private void setSearchPropertyList(System.DirectoryServices.DirectorySearcher _directorySearcher)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList = _directorySearcher.get_PropertiesToLoad();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;samaccountname&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;company&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;department&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;title&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;displayName&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;distinguishedName&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;objectClass&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;member&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;manager&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;mail&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;telephoneNumber&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;Userid&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;sn&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;EmployeeType&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;employeeNumber&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;c&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; propertyList.Add(&#39;samAccountName&#39;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public boolean next()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter pos, posCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str memberOfStr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CLRObject clrenumerator;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; networkAlias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; company &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; department &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; title &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; mail &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; givenName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; manager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; departmentNumber &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; telephoneNumber &amp;nbsp; &amp;nbsp; = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; userId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sn &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; employeeType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; adGroups &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; memberOf &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= conNull();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (currentUserNumber == 0 &amp;amp;&amp;amp; searchResultCollection == null)&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; prefix = &#39;LDAP://&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchScope = System.DirectoryServices.SearchScope::Subtree;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entry = new System.DirectoryServices.DirectoryEntry(prefix+selectedDomainName);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; directorySearcher = new System.DirectoryServices.DirectorySearcher(entry);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; directorySearcher.set_PageSize(65535);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; directorySearcher.set_CacheResults(false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; directorySearcher.set_SearchScope(searchScope);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; directorySearcher.set_Filter(strFmt(&#39;(&amp;amp;(objectClass=user)(objectCategory=person)%1(userAccountControl:1.2.840.113556.1.4.803:=512))&#39;, criteria));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.setSearchPropertyList(directorySearcher);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchResultCollection = directorySearcher.FindAll();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numberOfUsers = searchResultCollection.get_Count();&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; do&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; currentUserNumber++;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (currentUserNumber &amp;gt; numberOfUsers)&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; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; searchResult = searchResultCollection.get_Item(currentUserNumber-1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entry = searchResult.GetDirectoryEntry();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (entry)&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; PropertyCollection = entry.get_Properties();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!PropertyCollection)&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; entry.Dispose();&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!PropertyCollection);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;samaccountname&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; NetworkAlias = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection &amp;nbsp;= PropertyCollection.get_Item(&#39;company&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; company = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection &amp;nbsp;= PropertyCollection.get_Item(&#39;telephoneNumber&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; telephoneNumber = PropertyValueCollection.get_Value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; telephoneNumber = telephoneNumber; //str2int(telephoneNumber)==0 ? &quot;&quot; : telephoneNumber;&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;department&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; department = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;departmentNumber&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; departmentNumber = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;title&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&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; title = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;mail&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&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; mail = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;givenName&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; givenName = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;Userid&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UserId = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;EmployeeNumber&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; employeeNumber = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;sn&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sn = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PropertyValueCollection = propertyCollection.get_Item(&#39;EmployeeType&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection &amp;amp;&amp;amp; PropertyValueCollection.get_Count())&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; if (PropertyValueCollection.get_Value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; employeeType = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;manager&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; manager = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;c&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; country = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;samAccountName&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; samAccountName = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;userAccountControl&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; userAccountControl = PropertyValueCollection.get_Value();&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyValueCollection = PropertyCollection.get_Item(&#39;memberOf&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (PropertyValueCollection)&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; if (PropertyValueCollection.get_Value())&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; clrenumerator = PropertyValueCollection.GetEnumerator();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (clrenumerator.MoveNext())&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; &amp;nbsp; &amp;nbsp; memberOfStr = clrenumerator.get_Current();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memberOf += [memberOfStr];&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; //posCount = PropertyValueCollection.get_Count();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //for (Pos=0; pos&amp;lt;posCount;pos++)&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; &amp;nbsp; &amp;nbsp; //memberOfStr = PropertyValueCollection.get_Item(pos);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //memberOf += [memberOfStr];&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; }&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; catch (Exception::CLRError)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //SRSProxy::handleClrException(Exception::Warning);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //warning(strFmt(&quot;@SYS117734&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; curext();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getCompany()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return company;&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;public str getCountry()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return country;&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;public str getDepartmentNumber()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return departmentNumber;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public boolean getDisabled()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Added new conditions for when a user should be seen as disabled.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean ret;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //ACCOUNTDISABLE &amp;nbsp; &amp;nbsp;0x0002 &amp;nbsp; &amp;nbsp;2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ret = &amp;nbsp;bitTest(userAccountControl, 1 &amp;lt;&amp;lt; 1);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!ret &amp;amp;&amp;amp; title == &#39;SLUTAT&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!ret &amp;amp;&amp;amp; (strLen(departmentNumber) &amp;gt; 0 &amp;amp;&amp;amp; !strRem(departmentNumber,&#39;0&#39;)) &amp;amp;&amp;amp; (strLen(employeeNumber) &amp;gt; 0 &amp;amp;&amp;amp; !strRem(employeeNumber,&#39;0&#39;)))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getEmployeeNumber()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return employeeNumber;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getEmployeeType()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return EmployeeType;&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;public str getGivenName()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return givenName;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public email getMail()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return mail;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getManager()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return subStr(manager&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , strfind(manager, &#39;CN=&#39;, 1, strLen(manager))+3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , strfind(manager, &#39;,&#39;, strfind(manager, &#39;CN=&#39;, 1, strLen(manager)), strLen(manager)) - strfind(manager, &#39;CN=&#39;,1 , strLen(manager)) - 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public container getMemberOf()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return memberOf;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getSamAccountName()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return samAccountName;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getSn()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return sn;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getTelephoneNumber()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return telephoneNumber;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str getUserId()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return UserId;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public int parmCurrentUserNumber(int _currentUserNumber = currentUserNumber)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentUserNumber = _currentUserNumber;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return currentUserNumber;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str parmFileName(Filename _filename = filename)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; filename &amp;nbsp;= _filename;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return filename;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public str parmselectedDomainName(str _selectedDomainName = selectedDomainName)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; selectedDomainName &amp;nbsp;= _selectedDomainName;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return selectedDomainName;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public void reset()&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentUserNumber = 0;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/3564876992940245516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-export-activedirectory-data-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3564876992940245516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3564876992940245516'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-export-activedirectory-data-to.html' title='AX2012 Export ActiveDirectory Data to file.'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-1722631221527443380</id><published>2017-04-20T09:04:00.001+00:00</published><updated>2017-04-20T09:04:19.201+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Import CostCenter Owner</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;static void Krishh_ImportCostCenterOwner(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #AviFiles&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #OCCRetryCount&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dialog &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog = new dialog(&quot;Import cost center owners&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgFileNameOpen, dlgFirstRowsIsHeader;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; NoYesId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstRowIsHeader;&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; readcon;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CommaIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIoPermission &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;permission;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysOperationProgress &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;progressbar = new SysOperationProgress();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileRowsRead;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; OMOperatingUnit &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oMOperatingUnit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttribute &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionAttributeValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; HcmWorkerRecId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hcmWorkerRecId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgFileNameOpen &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = dialog.addField(extendedTypeStr(FilenameOpen));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgFirstRowsIsHeader &amp;nbsp; &amp;nbsp;= dialog.addField(extendedTypeStr(NoYesId), &quot;First row is header&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dialog.run())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= dlgFileNameOpen.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstRowIsHeader &amp;nbsp; &amp;nbsp;= dlgFirstRowsIsHeader.value();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!fileName)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;File name must be specified&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission = new FileIoPermission(filename,&#39;r&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = new CommaIo(filename, &#39;r&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file.inFieldDelimiter(&#39;;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!file)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(strFmt(&quot;Error opening file&quot;, fileName));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressbar.setCaption(&quot;Importing cost center owners&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressbar.setAnimation(#AviUpdate);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&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;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (file.status() == IO_Status::OK)&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; readCon = file.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileRowsRead++;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileRowsRead &amp;gt; firstRowIsHeader &amp;amp;&amp;amp; readCon &amp;amp;&amp;amp; conPeek(readcon, 1))&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; &amp;nbsp; &amp;nbsp; oMOperatingUnit = OMOperatingUnit::findName(conPeek(readcon, 1), OMOperatingUnitType::OMCostCenter);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!oMOperatingUnit)&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; &amp;nbsp; warning(strFmt(&quot;Cost center %1 not found.&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find worker from user id&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; &amp;nbsp; hcmWorkerRecId = HcmWorker::userId2Worker(conPeek(readcon, 2));&lt;br /&gt;
&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; &amp;nbsp; if (!hcmWorkerRecId)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; warning(strFmt(&quot;User id %1 not found as worker in AX.&quot;));&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; &amp;nbsp; else&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find and update dimensionAttributeValue with worker as owner&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; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressbar.setText(strfmt(&quot;@SYS136776&quot;, fileRowsRead));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressbar.update();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttsCommit;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;%1 rows read from file&quot;, fileRowsRead));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception::Error)&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; error(&quot;Error&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception::Deadlock)&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; retry;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception::UpdateConflict)&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; if (appl.ttsLevel() == 0)&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 (xSession::currentRetryCount() &amp;gt;= #RetryNum)&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; &amp;nbsp; &amp;nbsp; throw Exception::UpdateConflictNotRecovered;&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; else&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; &amp;nbsp; &amp;nbsp; retry;&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; throw Exception::UpdateConflict;&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1722631221527443380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-import-costcenter-owner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1722631221527443380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1722631221527443380'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-import-costcenter-owner.html' title='AX2012 Import CostCenter Owner'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-4345970141215778972</id><published>2017-04-20T09:02:00.003+00:00</published><updated>2017-04-20T09:02:52.967+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dimensions"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Export Account Structures</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;static void Krishh_AcctStructureExport(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionHierarchy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionHierarchy;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionHierarchyLevel &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dimensionHierarchyLevel;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttribute &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionAttribute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionConstraintNode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dimensionConstraintNode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionConstraintNodeCriteria &amp;nbsp; &amp;nbsp; dimensionConstraintNodeCriteria;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIOPermission &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileIoPermission;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CommaIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; csvFile;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; writecon;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dialog &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dfFileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstRow = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; countRows;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog = new Dialog(&quot;Export account structure text file&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dfFileName = dialog.addField(extendedTypeStr(FileNameSave));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.filenameLookupFilter([&quot;CSV files&quot;, #AllFilesName+#CSV, &quot;All files&quot;, #AllFiles]);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dialog.run())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = &amp;nbsp;dfFileName.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;Export cancelled&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileIoPermission = new FileIOPermission(filename ,&#39;W&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileIoPermission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; csvFile = new CommaIO(filename, &#39;w&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; csvFile.outFieldDelimiter(&#39;;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while select dimensionHierarchy order by dimensionHierarchy.Name, dimensionHierarchyLevel.Level, dimensionConstraintNodeCriteria.RangeFrom, dimensionConstraintNodeCriteria.RangeTo, dimensionConstraintNodeCriteria.WildCardString&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where !dimensionHierarchy.IsSystemGenerated&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionHierarchyLevel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where &amp;nbsp; dimensionHierarchyLevel.DimensionHierarchy == dimensionHierarchy.RecId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionAttribute&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where &amp;nbsp; dimensionAttribute.RecId == dimensionHierarchylevel.DimensionAttribute&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionConstraintNode&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where &amp;nbsp; dimensionConstraintNode.DimensionHierarchyLevel == dimensionHierarchyLevel.RecId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionConstraintNodeCriteria&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where &amp;nbsp; dimensionConstraintNodeCriteria.DimensionConstraintNode == dimensionConstraintNode.RecId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (firstRow)&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; writeCon = [ &amp;nbsp; &amp;nbsp;&quot;Account structure&quot;,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Level&quot;,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Dimension&quot;,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;From&quot;,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;To&quot;,&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Wildcard&quot;];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; csvFile.write(writecon);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; firstRow = false;&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; writeCon = [ &amp;nbsp; &amp;nbsp;dimensionHierarchy.Name,&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; &amp;nbsp; int2str(dimensionHierarchyLevel.Level),&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; &amp;nbsp; dimensionAttribute.Name,&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; &amp;nbsp; dimensionConstraintNodeCriteria.RangeFrom,&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; &amp;nbsp; dimensionConstraintNodeCriteria.RangeTo,&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; &amp;nbsp; dimensionConstraintNodeCriteria.WildCardString];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; csvFile.write(writecon);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; countRows++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;%1 rows written to %2.&quot;, countRows, fileName));&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/4345970141215778972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-export-account-structures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/4345970141215778972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/4345970141215778972'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-export-account-structures.html' title='AX2012 Export Account Structures'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-900270678934101907</id><published>2017-04-20T08:38:00.000+00:00</published><updated>2017-04-20T08:38:02.476+00:00</updated><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="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 finding AIF menuItems and write to file</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Traverse the Menu Node in AOT and find AIF menuItems and write to a file.&lt;br /&gt;
&lt;br /&gt;
static void krishh_verifyAifInMenu(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Dialog&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog = new dialog(&#39;verifyAifInMenu&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogField dlgFileName, dlgAction;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileName &amp;nbsp; &amp;nbsp;fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; action;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; saved;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // File&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TextIo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ioData;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIOPermission permission;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Treenode treenode = TreeNode::findNode(@&#39;\Menus\KrishhTest\Periodic&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Treenode treenode = TreeNode::findNode(@&#39;\Menus\KrishhTest\Periodic&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Treenode treenode = TreeNode::findNode(@&#39;\Menus\KrishhTest\Periodic&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Treenode treenode = TreeNode::findNode(@&#39;\Menus\KrishhTest\Periodic&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TreeNodeTraverser traverser = new TreeNodeTraverser(treenode);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TreeNode node, menuTypeNode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UtilElements &amp;nbsp; &amp;nbsp;ue;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MenuItem &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mi;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictClass &amp;nbsp; &amp;nbsp; &amp;nbsp; dc;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; className &amp;nbsp; &amp;nbsp; &amp;nbsp; cn, scn;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Counter &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i,j;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysDictMethod &amp;nbsp; sdm;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Source &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Str1260 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable, sClass, sMenuItem, sClassMethodName, sMethod, sAIFPort, sDirection, sEnabled, sActionAddedToPort, sFolderName;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Text.RegularExpressions.Match regExMatch;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;isValid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;position, posStart, posEnd;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DictTable &amp;nbsp; &amp;nbsp; &amp;nbsp; dt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RecId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifFound;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifPort &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifPort;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifChannel &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aifChannel;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifPortActionPolicy aifPortActionPolicy;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifActionId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Properties&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #AOT&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #AIF&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #localmacro.PortInfo&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;any2str(%1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ &quot;,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ any2str(%2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ &quot;,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ any2str(%3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ &quot;,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ any2str(%4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ &quot;,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ any2str(%5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ &quot;,&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ any2str(%6)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, &quot;Goto method&quot;, SysInfoAction_Editor::newOpen(%7)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #EndMacro&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; saved = xSysLastValue::getValue(curExt(),curUserId(),UtilElementType::Class,&#39;verifyAifInMenu&#39;,&#39;fileName&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (saved)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = conpeek(saved,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgFileName = dialog.addFieldValue(extendedTypeStr(FilenameOpen),fileName,&#39;Filename&#39;,&#39;File to save result.&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //dlgAction = dialog.addFieldValue(extendedTypeStr(NumberOf),0,&#39;Action&#39;,&#39;1=Save, 2=Undeploy, 3=Deploy&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dialog.run())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = dlgFileName.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saved = [fileName];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xSysLastValue::putValue(saved,curExt(),curUserId(),UtilElementType::Class,&#39;verifyAifInMenu&#39;,&#39;fileName&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission = new FileIOPermission(fileName, &amp;nbsp;#io_write);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Open file for writing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData = new TextIo(filename, #io_write);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Check file open status&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!ioData)&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; // File &#39;%1&#39; could not be opened.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(strfmt(&quot;@SYS19312&quot;, filename));&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; // Set file delimiters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.outRecordDelimiter(&#39;\r\n&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.outFieldDelimiter(&#39;;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.write(&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; &quot;Menu label&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Menu item&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Class&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;AIF Port&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Direction&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Enabled&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Methode&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;ActionAddedToPort&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Folder name&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setPrefix(&quot;Services&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (traverser.next())&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; node = traverser.currentNode();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;nbsp;(node.AOTgetProperty(&#39;MenuItemName&#39;)!= &#39;&#39;)&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; menuTypeNode = TreeNode::findNode(#MenuItemsPath +&quot;\\Action\\&quot; + findProperty(node.AOTgetProperties(),#PropertyMenuItemName));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mi = traverser.currentNode();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Is menuitem object a class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (findProperty(menuTypeNode.AOTgetProperties(),#PropertyObjectType) == enum2Value(MenuItemObjectType::Class))&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; &amp;nbsp; &amp;nbsp; // Find Class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (findProperty(menuTypeNode.AOTgetProperties(),#PropertyObject) == &#39;SysOperationServiceController&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc = new DictClass(className2Id(subStr(findProperty(menuTypeNode.AOTgetProperties(),#PropertyParameters), 1, strScan(findProperty(menuTypeNode.AOTgetProperties(),#PropertyParameters), &#39;.&#39;, 1, 1000)-1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc = new DictClass(className2Id(findProperty(menuTypeNode.AOTgetProperties(),#PropertyObject)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable &amp;nbsp; &amp;nbsp; &amp;nbsp;= mi.label();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sMenuItem &amp;nbsp; = #MenuItemsPath +&quot;\\Action\\&quot; + findProperty(node.AOTgetProperties(),#PropertyMenuItemName);//node.treeNodePath();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sClass &amp;nbsp; &amp;nbsp; &amp;nbsp;= dc.name();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setPrefix(strFmt(&quot;%1, %2, %3, %4&quot;, node.treeNodePath(), sLable, sMenuItem, sClass));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifFound = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find the methode in the class where AxdDocumentParameters is used&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (i=1;i&amp;lt;=dc.objectMethodCnt()+dc.staticMethodCnt();i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Instance method else Static method&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; &amp;nbsp; if (i&amp;lt;=dc.objectMethodCnt())&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdm = new SysDictMethod(UtilElementType::ClassInstanceMethod, dc.id(), dc.objectMethod(i));&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; &amp;nbsp; }&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; &amp;nbsp; else&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdm = new SysDictMethod(UtilElementType::ClassStaticMethod, dc.id(), dc.staticMethod(i-dc.objectMethodCnt()));&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; &amp;nbsp; }&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; &amp;nbsp; sMethod = sdm.path();&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; &amp;nbsp; s = sdm.getSource();&lt;br /&gt;
&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; &amp;nbsp; // Find port from AxdDocumentParameters&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)AxdDocumentParameters::find\(\).krishh.{1,22}Port&#39;);&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; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)AifSendService::submitFrom&#39;);&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; &amp;nbsp; isValid = isValid &amp;amp;&amp;amp; regExMatch.get_Success();&lt;br /&gt;
&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; &amp;nbsp; setPrefix(&quot;Port&quot;);&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; &amp;nbsp; if (isValid)&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt = new DictTable(tableNum(AxdDocumentParameters));&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get AIFPort from AxdDocumentParameters used in code&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (j=1;j&amp;lt;=dt.fieldCnt();j++)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strScan(dt.fieldName(dt.fieldCnt2Id(j)), &#39;krishh&#39;, 1, 100) &amp;amp;&amp;amp; strScan(dt.fieldName(dt.fieldCnt2Id(j)), &#39;Port&#39;, 1, 100))&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)%1&#39;, dt.fieldName(dt.fieldCnt2Id(j))));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recId = &amp;nbsp; &amp;nbsp;AxdDocumentParameters::find().(dt.fieldCnt2Id(j));&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find Port&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (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;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select firstOnly aifPort&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifPort.RecId == 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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join aifChannel&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifChannel.ChannelId == aifPort.ChannelId;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sDirection &amp;nbsp;= enum2Value(aifChannel.Direction);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sEnabled &amp;nbsp; &amp;nbsp;= enum2Value(aifChannel.Enabled);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sFolderName = aifChannel.TransportAddress;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifFound = true;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (aifFound)&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find action&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sActionAddedToPort = &quot;&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)AifSendActionType::&#39;));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate position of the portaction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; position &amp;nbsp; &amp;nbsp;= regExMatch.get_Index();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posStart &amp;nbsp; &amp;nbsp;= position+1+strLen(&#39;AifSendActionType::&#39;);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posEnd &amp;nbsp; &amp;nbsp; &amp;nbsp;= strScan(s, &#39;)&#39;, position, strLen(s));&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convet actiontype to actionId-searchstring&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (subStr(s, posStart, posEnd-posStart))&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SendByQuery&quot;:&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId = &quot;*.find&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SendByKey&quot;:&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId = &quot;*.read&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find portaction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while select AifPortActionPolicy&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where AifPortActionPolicy.ActionId like aifActionId&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; AifPortActionPolicy.Port == 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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get the serviceclassname&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scn = subStr(AifPortActionPolicy.ActionId, 1, strLen(AifPortActionPolicy.ActionId) - (strLen(aifActionId)-1));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)classnum\(%1&#39;, scn));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a portaction exm. serviceclassname.action&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sActionAddedToPort = scn+subStr(aifActionId, 2, strLen(aifActionId));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Output Port info&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sEnabled &amp;amp;&amp;amp; sActionAddedToPort)&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.write(&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMenuItem&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , aifPort.Name&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sDirection&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sEnabled&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMethod&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sActionAddedToPort, sFolderName&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; // Find port from AifOutboundPort::find&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; &amp;nbsp; recId = 0;&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)AifSendService::submitFrom&#39;);&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; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)AifOutboundPort::find\(&#39;);&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; &amp;nbsp; isValid = isValid &amp;amp;&amp;amp; regExMatch.get_Success();&lt;br /&gt;
&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; &amp;nbsp; if (isValid)&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate position of the portClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; position &amp;nbsp; &amp;nbsp;= regExMatch.get_Index();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; posStart &amp;nbsp; &amp;nbsp;= position+2+strLen(&#39;AifOutboundPort::find\(&#39;);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; posEnd &amp;nbsp; &amp;nbsp; &amp;nbsp;= strScan(s, &#39;);&#39;, position, strLen(s))-1;&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convet actiontype to actionId-searchstring&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; scn = subStr(s, posStart, posEnd-posStart);&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find Port&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (scn)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select firstOnly aifPort&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifPort.Name == scn&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join aifChannel&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifChannel.ChannelId == aifPort.ChannelId;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sDirection &amp;nbsp;= enum2Value(aifChannel.Direction);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sEnabled &amp;nbsp; &amp;nbsp;= enum2Value(aifChannel.Enabled);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sFolderName = aifChannel.TransportAddress;&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recId = aifPort.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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifFound = true;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (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;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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find action&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sActionAddedToPort = &quot;&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)AifSendActionType::&#39;));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate position of the portaction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; position &amp;nbsp; &amp;nbsp;= regExMatch.get_Index();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posStart &amp;nbsp; &amp;nbsp;= position+1+strLen(&#39;AifSendActionType::&#39;);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posEnd &amp;nbsp; &amp;nbsp; &amp;nbsp;= strScan(s, &#39;)&#39;, position, strLen(s));&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convet actiontype to actionId-searchstring&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (subStr(s, posStart, posEnd-posStart))&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SendByQuery&quot;:&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId = &quot;*.find&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SendByKey&quot;:&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId = &quot;*.read&quot;;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find portaction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while select AifPortActionPolicy&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where AifPortActionPolicy.ActionId like aifActionId&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; AifPortActionPolicy.Port == 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;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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get the serviceclassname&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scn = subStr(AifPortActionPolicy.ActionId, 1, strLen(AifPortActionPolicy.ActionId) - (strLen(aifActionId)-1));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)classnum\(%1&#39;, scn));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a portaction exm. serviceclassname.action&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sActionAddedToPort = scn+subStr(aifActionId, 2, strLen(aifActionId));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Output Port info&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sEnabled &amp;amp;&amp;amp; sActionAddedToPort)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.write(&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMenuItem&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , aifPort.Name&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sDirection&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sEnabled&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMethod&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sActionAddedToPort, sFolderName&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]);&lt;br /&gt;
&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; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; // Find port from AifSendService::submitDefault&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; &amp;nbsp; recId = 0;&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; &amp;nbsp; sDirection = &#39;&#39;;&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; &amp;nbsp; sEnabled = &#39;&#39;;&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; &amp;nbsp; sFolderName = &#39;&#39;;&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; &amp;nbsp; sActionAddedToPort = &#39;&#39;;&lt;br /&gt;
&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)AifSendService::submitDefault\(&#39;);&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; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, @&#39;(?i)classnum\(&#39;);&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; &amp;nbsp; isValid = isValid &amp;amp;&amp;amp; regExMatch.get_Success();&lt;br /&gt;
&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; &amp;nbsp; if (isValid)&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Calculate position of the portClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; position &amp;nbsp; &amp;nbsp;= regExMatch.get_Index();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; posStart &amp;nbsp; &amp;nbsp;= position+1+strLen(&#39;classnum\(&#39;);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; posEnd &amp;nbsp; &amp;nbsp; &amp;nbsp;= strScan(s, &#39;),&#39;, position, strLen(s));&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convet actiontype to actionId-searchstring&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; scn = subStr(s, posStart, posEnd-posStart);&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find Port&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (scn)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select firstOnly AifPortActionPolicy&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where AifPortActionPolicy.ActionId == scn + #MethodNameSeparator + #DefaultSendByKeyAction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join aifPort&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifPort.RecId == AifPortActionPolicy.Port&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join aifChannel&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where aifChannel.ChannelId == aifPort.ChannelId;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sDirection = enum2Value(aifChannel.Direction);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sEnabled = enum2Value(aifChannel.Enabled);&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sFolderName = aifChannel.TransportAddress;&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recId = AifPortActionPolicy.Port;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifFound = true;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (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;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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aifActionId = &quot;*.read&quot;;&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Find portaction&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while select AifPortActionPolicy&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where AifPortActionPolicy.ActionId like aifActionId&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; AifPortActionPolicy.Port == 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;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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get the serviceclassname&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scn = subStr(AifPortActionPolicy.ActionId, 1, strLen(AifPortActionPolicy.ActionId) - (strLen(aifActionId)-1));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; regExMatch = System.Text.RegularExpressions.Regex::Match(s, strFmt(@&#39;(?i)classnum\(%1&#39;, scn));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isValid = regExMatch.get_Success();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isValid)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a portaction exm. serviceclassname.action&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sActionAddedToPort = scn+subStr(aifActionId, 2, strLen(aifActionId));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Output Port info&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sEnabled &amp;amp;&amp;amp; sActionAddedToPort)&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error(#PortInfo(aifPort.Name, sDirection, sEnabled, sMethod, sActionAddedToPort, sFolderName, sdm.path()));&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; ioData.write(&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMenuItem&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , aifPort.Name&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sDirection&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sEnabled&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMethod&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sActionAddedToPort, sFolderName&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]);&lt;br /&gt;
&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; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; if (!aifFound)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&#39;%1, %2, %3, %4, %5, %6, %7, %8&#39;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sLable&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMenuItem&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Not AIF&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;));&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; &amp;nbsp; ioData.write(&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sLable&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sMenuItem&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , sClass&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;Not AIF&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , &quot;No&quot;&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; &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; &amp;nbsp; &amp;nbsp; }&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; }&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; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/900270678934101907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-finding-aif-menuitems-and-write.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/900270678934101907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/900270678934101907'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-finding-aif-menuitems-and-write.html' title='AX2012 finding AIF menuItems and write to file'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-6291892161295412649</id><published>2017-04-20T08:30:00.000+00:00</published><updated>2017-04-20T08:38:23.728+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Update AIF Port adresses </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When we export from one environmen to another we should update the port addresses to the new environment addresses.&lt;br /&gt;
Like moving from config environmen to SIT, QA..etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;static void krishh_UpdateAddressForPorts(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AifChannel &amp;nbsp;aifchannel;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fromPath, toPath;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; Update;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dialog &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField _from;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField _to;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogField _Update&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog = new Dialog(&quot;Move configdata&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addInfoImage();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addText(&quot;This job changes all paths on inbound and outbound ports!!!&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addGroup(&quot;Paths&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _from &amp;nbsp; = dialog.addField(ExtendedTypeStr(String255), &quot;From enviroment&quot; , &quot;Normally from MasterConfigData (CFG)&quot; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _to &amp;nbsp; &amp;nbsp; = dialog.addField(ExtendedTypeStr(String255), &quot;To enviroment&quot; &amp;nbsp; , &quot;Valid enviroments are SIT, UAT, QA &amp;amp; PROD&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addGroup(&quot;Update&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _Update = dialog.addField(ExtendedTypeStr(NoYesId) &amp;nbsp;, &quot;Commit change&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, &quot;Update the changes&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //InitValues&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _from.value(&quot;CFG&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _Update.value(false);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.run();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fromPath = _from.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; toPath &amp;nbsp; = _to.value();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if ((!fromPath || !toPath) || (fromPath == toPath))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ttsBegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while select forupdate aifchannel where aifchannel.Direction != AIFChannelDirection::Both&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strScan(aifchannel.TransportAddress, fromPath, 1, 255))&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; aifchannel.TransportAddress=strReplace(aifchannel.transportAddress, fromPath, toPath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(aifchannel.TransportAddress);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (_Update)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aifchannel.update();&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; ttsCommit;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/6291892161295412649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-update-aif-port-adresses.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6291892161295412649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6291892161295412649'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-update-aif-port-adresses.html' title='AX2012 Update AIF Port adresses '/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-1473708211668732646</id><published>2017-04-20T08:26:00.002+00:00</published><updated>2017-04-20T08:26:16.519+00:00</updated><title type='text'>AX2012 Flush recids</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
static void krishh_flushAllRecIds(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #AviFiles&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dictionary &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dictionary &amp;nbsp;= &amp;nbsp; new Dictionary();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; systemSequence &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;systemseq &amp;nbsp; = &amp;nbsp; new systemSequence();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysDictTable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dictTable;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; TableId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableId,LastTableId;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysOperationProgress &amp;nbsp; &amp;nbsp;progress;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; setPrefix(&quot;Flush all RecIds&quot;);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; tableId = dictionary.tableNext(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lastTableId = dictionary.tableCnt();&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress = new SysOperationProgress();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.updateInterval(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.setAnimation(#AviStopwatch);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.setTotal(LastTableId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.setText(strfmt(&quot;Flushing recIds&quot;));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ttsbegin;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (tableId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.incCount();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dictTable = new SysDictTable(tableId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setPrefix(dictTable.name());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Systemseq.suspendRecIds(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Systemseq.suspendTransIds(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Systemseq.flushValues(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Systemseq.removeRecIdSuspension(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Systemseq.removeTransIdSuspension(tableId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //info(strFmt(&quot;Tables RecId Flushed (%1)&quot;, dictTable.name()));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableId = dictionary.tableNext(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ttscommit;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1473708211668732646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-flush-recids.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1473708211668732646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1473708211668732646'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-flush-recids.html' title='AX2012 Flush recids'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-5603727721679642618</id><published>2017-04-20T08:25:00.000+00:00</published><updated>2017-04-20T08:25:09.115+00:00</updated><title type='text'>AX2012 get gropu dimension from  financial dimension </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
static void krish_findGroupDimension(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_dimensionTypeName &amp;nbsp; &amp;nbsp;= &#39;COSTCENTER&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionValue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_dimensionDisplayName = &#39;csttest&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionExt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;retVal;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; OMOperatingUnit &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oMOperatingUnit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttribute &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionAttribute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttributeLevelValue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionAttributeLevelValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttributeValue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dimensionAttributeValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DimensionAttributeValueSetItemView &amp;nbsp;dimensionAttributeValueSetItemView;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; select oMOperatingUnit&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Join dimensionAttribute where dimensionAttribute.Name == _dimensionTypeName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionAttributeValue where dimensionAttributeValue.DimensionAttribute == dimensionAttribute.RecId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Join dimensionAttributeLevelValue where dimensionAttributeLevelValue.DimensionAttributeValue == dimensionAttributeValue.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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; dimensionAttributeLevelValue.DisplayValue == _dimensionDisplayName;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; retVal = dimensionAttributeValue.GroupDimension;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!retVal)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select dimensionAttribute where dimensionAttribute.Name == _dimensionTypeName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Join dimensionAttributeValueSetItemView where dimensionAttributeValueSetItemView.DimensionAttribute == dimensionAttribute.RecId &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dimensionAttributeValueSetItemView.DisplayValue == _dimensionDisplayName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join dimensionAttributeValue where dimensionAttributeValue.RecId == dimensionAttributeValueSetItemView.DimensionAttributeValue;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retVal = dimensionAttributeValue.GroupDimension;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;DimensionAttribute = %1&quot;, DimensionAttribute.RecId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;DimensionAttributeValueSetItemView = %1&quot;, DimensionAttributeValueSetItemView.RecId));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;%1 : %2 = %3 (%4)&quot;, _dimensionTypeName, _dimensionDisplayName, retVal, dimensionAttributeValue.RecId));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/5603727721679642618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-get-gropu-dimension-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/5603727721679642618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/5603727721679642618'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-get-gropu-dimension-from.html' title='AX2012 get gropu dimension from  financial dimension '/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-2788949186306396541</id><published>2017-04-20T08:16:00.000+00:00</published><updated>2017-04-20T08:18:33.095+00:00</updated><title type='text'>AX2012 File Reader Test</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
static void fileAccessTest(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CommaIO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; commaIO;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIOPermission &amp;nbsp; &amp;nbsp;fileIOPermission;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; recCountNotExist;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; errorlog;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dialog &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialogField;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FilenameOpen &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;filename;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog = new Dialog(&quot;Test version of File reader&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialogField = dialog.addFieldValue(extendedTypeStr(FilenameOpen), &quot;&quot;, &quot;File to access&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dialog.run())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = dialogField.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;No filename&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileIOPermission = new FileIOPermission(filename,&#39;r&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileIOPermission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //BP Deviation documented&lt;br /&gt;
&amp;nbsp; &amp;nbsp; commaIO = new CommaIO(filename, &#39;r&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (commaIO != null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (commaIO.status())&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; throw error(&quot;@SYS52680&quot;);&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; commaIO.inRecordDelimiter(&#39;\r\n&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; commaIO.inFieldDelimiter(&#39;,&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;@SYS52680&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; c = conNull();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (commaIO)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (commaIO.status() == IO_Status::OK)&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; if (row==0)&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; c = commaIO.read();&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(con2Str(c));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c = commaIO.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(con2Str(c));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/2788949186306396541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-file-reader-test-static-void.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2788949186306396541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2788949186306396541'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-file-reader-test-static-void.html' title='AX2012 File Reader Test'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-5823856226451847940</id><published>2017-04-20T08:13:00.000+00:00</published><updated>2017-04-20T08:18:45.428+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 CompileCIL and Refresh Services using X++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
static void krishh_CompileCILRefreshServices(Args _args)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #AviFiles&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #File&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define.fileName(&#39;AxTime.txt&#39;)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TextIo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;file;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FileIoPermission &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;permission;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SysOperationProgress &amp;nbsp; &amp;nbsp;progress;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dialog &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dialog;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgCompile;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgCIL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgIncCIL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlgRefreshService;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStarted[2];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[4]; //1:FUllCompileTime,2:FULLCILCompileTime,3:IncrementalCILTime,4:RefreshServicesTime&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeExpected;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;filename&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void getAverageTime()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = WinAPI::getCurrentDirectory() + &#39;\\&#39; + fileName;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission = new FileIoPermission(filename, #io_read+#io_write);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(WinAPI::fileExists(filename))&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; file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= new TextIo(filename, #io_read);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer &amp;nbsp; = file.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[1] &amp;nbsp;= str2int(conPeek(fileContainer,1));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[2] &amp;nbsp;= str2int(conPeek(fileContainer,2));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[3] &amp;nbsp;= str2int(conPeek(fileContainer,3));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[4] &amp;nbsp;= str2int(conPeek(fileContainer,4));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = null;&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; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void setAverageTime()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission = new FileIoPermission(filename, #io_write);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer = conNull();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer = conIns(fileContainer,1,int2str(timeAverage[1]));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer = conIns(fileContainer,2,int2str(timeAverage[2]));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer = conIns(fileContainer,3,int2str(timeAverage[3]));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileContainer = conIns(fileContainer,4,int2str(timeAverage[4]));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = new TextIo(filename, #io_write);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file.write(fileContainer);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file.finalize();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = null;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog &amp;nbsp;= new Dialog(&quot;Compile/CIl/Refresh&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addInfoImage();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addText(&quot;Please select actions needed and please be aware that all are time consuming processes&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addGroup(&quot;Compile application&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgCompile &amp;nbsp;= dialog.addFieldValue(extendedTypeStr(NoYesId),NoYes::No,&quot;AOT Compile&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addGroup(&quot;Compile CIL&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgCIL &amp;nbsp; &amp;nbsp; &amp;nbsp;= dialog.addFieldValue(extendedTypeStr(NoYesId), NoYes::No, &quot;FULL&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgIncCIL &amp;nbsp; = dialog.addFieldValue(extendedTypeStr(NoYesId), NoYes::No, &quot;Incemental&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dialog.addGroup(&quot;Other&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dlgRefreshService &amp;nbsp; = dialog.addFieldValue(extendedTypeStr(NoYesId),NoYes::No,&quot;Refresh Services&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (!dialog.run())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw error(&quot;Operation aborted&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; filename &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= #fileName;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeAverage[1] &amp;nbsp;= 3600; // 60:00 min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeAverage[2] &amp;nbsp;= 1800; // 30:00 min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeAverage[3] &amp;nbsp;= 900; &amp;nbsp;// 15:00 min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeAverage[4] &amp;nbsp;= 300; &amp;nbsp;// 5:00 min&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getAverageTime();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeExpected += dlgCompile.value() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;? timeAverage[1] : 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeExpected += dlgCIL.value() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;? timeAverage[2] : 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeExpected += dlgIncCIL.value() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ? timeAverage[3] : 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeExpected += dlgRefreshService.value() &amp;nbsp; ? timeAverage[4] : 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress = new SysOperationProgress();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.updateInterval(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.setAnimation(#AviStopwatch);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; progress.setTotal(1 + dlgCompile.value() + (dlgCIL.value() || dlgIncCIL.value()) + dlgRefreshService.value());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; timeStarted[1] = timeNow();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;Process stared by %1&quot;,curUserId()));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Compile the application&lt;br /&gt;
&amp;nbsp; &amp;nbsp; startLengthyOperation();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sleep(3);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //AOT Compile&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dlgCompile.value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.incCount();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.setText(strfmt(&quot;AOT Compile compiling | Start time : %1 ETA : %2&quot;,time2str(timeNow(),1,1),time2str(timeAverage[1] + timeNow(),1,1)));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Do function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStarted[2] = timeNow();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCompileAll::flushClient();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCompileAll::compile();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCheckList::finished(classnum(SysCheckListItem_Compile));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCheckList::finished(classnum(SysCheckListItem_CompileUpgrade));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCheckList::finished(className2Id(classStr(SysCheckListItem_CompileServ)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCheckList::finished(classnum(SysCheckListItem_SysUpdateCodeCompilInit));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[1] = ((timeNow()-timeStarted[2]) + timeAverage[1])/2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;AOT Compile toke : %1*&quot;,time2str(timeAverage[1],1,1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Incremntal CIL&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dlgIncCIL.value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.incCount();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.setText(strfmt(&quot;Incremental CIL Compiling | Start time : %1 ETA : %2&quot;,time2str(timeNow(),1,1),time2str(timeAverage[3] + timeNow(),1,1)));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Do function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStarted[2] = timeNow();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCompileIL::generateIncrementalIL();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[3] = ((timeNow()-timeStarted[2]) + timeAverage[3])/2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;Increment CIL toke : %1*&quot;,time2str(timeAverage[3],1,1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Full CIL&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else if (dlgCIL.value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.incCount();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.setText(strfmt(&quot;FULL CIL Compiling | Start time : %1 ETA : %2&quot;,time2str(timeNow(),1,1),time2str(timeAverage[2] + timeNow(),1,1)));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Do function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStarted[2] = timeNow();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SysCompileIL::generateIL();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[2] = ((timeNow()-timeStarted[2]) + timeAverage[2])/2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;FULL CIL toke : %1*&quot;,time2str(timeAverage[2],1,1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Refresh services&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (dlgRefreshService.value())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.setText(strfmt(&quot;Refresh Services | Start time : %1 ETA : %2&quot;,time2str(timeNow(),1,1),time2str(timeAverage[4] + timeNow(),1,1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progress.incCount();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStarted[2] = timeNow();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AifServiceGenerationManager::registerServices();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeAverage[4] = ((timeNow()-timeStarted[2]) + timeAverage[4])/2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(strFmt(&quot;Refresh Services toke : %1*&quot;,time2str(timeAverage[4],1,1)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; setAverageTime();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; endLengthyOperation();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Flush all&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysFlushAOD::main(_args);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysFlushData::main(_args);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysFlushDictionary::main(_args);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;*Averagetime&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; info(strFmt(&quot;Total time spendt : %1&quot;,time2str(timeNow()-timeStarted[1],1,1)));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/5823856226451847940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-compilecil-and-refresh-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/5823856226451847940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/5823856226451847940'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2017/04/ax2012-compilecil-and-refresh-services.html' title='AX2012 CompileCIL and Refresh Services using X++'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-8713903078817998829</id><published>2016-12-07T13:22:00.001+00:00</published><updated>2016-12-07T13:22:20.305+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012 vpc"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamics AX 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Hide Query values in the dialog with select button Enabled</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;b&gt;Scneario: we want to hide the query values that was selected by the user in query range select button.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I created the parmmethod as below in the class Dialog,RunBaseDialogModify&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;public boolean hideQueryValuesInDialog(boolean _showValues = showValues)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; showValues = _showValues;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return showValues;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Added the highlighted code as below in the following method of class RunBaseDialogModify&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;client public static RunBaseDialogModify newRunbaseOnClient(&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RunBase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runBase,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogRunbase &amp;nbsp; dialog)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &amp;lt;GEERU&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RunBaseDialogModify runBaseDialogModify = RunBaseDialogModify::construct(runBase.runBaseDialogModifyType_RU());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &amp;lt;/GEERU&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runBaseDialogModify.parmRunbase(runBase);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runBaseDialogModify.parmDialog(dialog);&lt;br /&gt;
&lt;br /&gt;
/&lt;b&gt;/Addded by krishna&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; runBaseDialogModify.rsaShowQueryValuesInDialog(dialog.rsaShowQueryValuesInDialog());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return runBaseDialogModify;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Server public static RunBaseDialogModify newRunbaseOnServer(&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RunBase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runBase,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogRunbase &amp;nbsp; dialog)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &amp;lt;GEERU&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RunBaseDialogModify runBaseDialogModify = RunBaseDialogModify::construct(runBase.runBaseDialogModifyType_RU());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &amp;lt;/GEERU&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runBaseDialogModify.parmRunbase(runBase);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runBaseDialogModify.parmDialog(dialog);&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; runBaseDialogModify.rsaShowQueryValuesInDialog(dialog.rsaShowQueryValuesInDialog());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return runBaseDialogModify;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// &amp;lt;GEERU&amp;gt;&lt;br /&gt;
&lt;b&gt;protected boolean addField(SysDictField _dictField, Set _fieldNameSet, LabelType _labelType, Range _range)&lt;/b&gt;&lt;br /&gt;
// &amp;lt;/GEERU&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; boolean &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Map &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogField &amp;nbsp; &amp;nbsp; dialogField;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TableId &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableId;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (_dictField)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tableId = _dictField.tableid();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (_fieldNameSet.in(_dictField.name()))&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; if (this.existField(_dictField))&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; this.addRange(this.getFieldName(_dictField), _range);&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; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!dialogQueryFieldsMap.exists(tableId))&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; &amp;nbsp; &amp;nbsp; dialogQueryFieldsMap.insert(tableId, new Map(Types::String, Types::String));&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; &amp;nbsp; map &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = dialogQueryFieldsMap.lookup(tableId);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialogField = dialog.addField(extendedTypeStr(RunBaseRange), _labelType);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialogField.value(_range);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialogField.allowEdit(false);&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
// &amp;nbsp;dialogField.visible(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!showValues)&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; dialogField.visible(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; dialogField.visible(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.insert(_dictField.name(), dialogField.fieldname());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _fieldNameSet.add(_dictField.name());&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In your runbasebatch class override the method as below&lt;br /&gt;
&lt;b&gt;public DialogRunbase dialogInit(DialogRunbase dialog, boolean forceOnClient= false)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DialogRunbase ret;&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;b&gt; if (! dialog)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (xGlobal::clientKind() != ClientType::Server || forceOnClient)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog = DialogRunbase::newOnClient(this.caption(),this);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog = DialogRunbase::newOnServer(this.caption(),this);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; dialog.rsaShowQueryValuesInDialog(false);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;//Addded by krishna&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ret = super(dialog, forceOnClient);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above changes will hide your query range selected values in the dialog with showing select button.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/8713903078817998829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2016/12/hide-query-values-in-dialog-with-select.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8713903078817998829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/8713903078817998829'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2016/12/hide-query-values-in-dialog-with-select.html' title='Hide Query values in the dialog with select button Enabled'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-1201322408719646185</id><published>2015-07-13T13:00:00.001+00:00</published><updated>2015-07-13T13:23:39.120+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Ax2012 Useful functions 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Show viewhistory on form datasources if you have ValidaTimeState Enabled DateTime enabled on the tables of that form.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;create this method in Global class so you can call whereever you want in form button click as below.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;void clicked()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt; buttonHistoryClick(element, this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Super();&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;static public void buttonHistoryClick(FormRun _formRun, FormButtonControl _fbc)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt; void changeDataSources(ValidTimeStateAutoQuery _from, ValidTimeStateAutoQuery _to, boolean _allowDelete)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Counter &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataSourceNo;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FormDataSource &amp;nbsp;formDataSource;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (dataSourceNo=1;_formRun.dataSourceCount()&amp;gt;=dataSourceNo;dataSourceNo++)&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; formDataSource = _formRun.dataSource(dataSourceNo) as FormDataSource;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (formDataSource.validTimeStateAutoQuery() == _from &amp;amp;&amp;amp; new DictTable(formDataSource.table()).isValidTimeStateTable())&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; formDataSource.validTimeStateAutoQuery(_to);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (_to)&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; &amp;nbsp; &amp;nbsp; case ValidTimeStateAutoQuery::AsOfDate:&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; &amp;nbsp; formDataSource.validTimeStateAutoQuery(ValidTimeStateAutoQuery::AsOfDate);&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; &amp;nbsp; formDataSource.query().resetValidTimeStateQueryType();&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; &amp;nbsp; formDataSource.allowDelete(_allowDelete);&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; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case ValidTimeStateAutoQuery::DateRange:&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; &amp;nbsp; formDataSource.validTimeStateAutoQuery(ValidTimeStateAutoQuery::DateRange);&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; &amp;nbsp; formDataSource.query().validTimeStateDateTimeRange(DateTimeUtil::minValue(), DateTimeUtil::maxValue());&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; &amp;nbsp; formDataSource.allowDelete(_allowDelete);&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; &amp;nbsp; break;&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; formDataSource.executeQuery();&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;if (_fbc.labelText() == &quot;@SYS110266&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeDataSources(ValidTimeStateAutoQuery::AsOfDate, ValidTimeStateAutoQuery::DateRange, false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _fbc.text(&quot;Stop viewing History&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _fbc.normalImage(&quot;10006&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; changeDataSources(ValidTimeStateAutoQuery::DateRange, ValidTimeStateAutoQuery::AsOfDate, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _fbc.Text(&quot;@SYS110266&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _fbc.normalImage(&quot;10007&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;// this method is used to create filenameTimeStamp.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;static FileName createFilenameTimeStamp()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;FileName &amp;nbsp; &amp;nbsp;ret;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Microsoft.Dynamics.IntegrationFramework.Adapter.FileSystem &amp;nbsp; &amp;nbsp; &amp;nbsp; fileSystem;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #Aif&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileSystem &amp;nbsp; &amp;nbsp; &amp;nbsp;= AifUtil::getClrObject(#FileSystemProgId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ret = fileSystem.GetCurrentTimestamp();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return ret;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;// This method is used to split the string, and returns the conatiner with the position defined in the parameter&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;public static str rsaStrSplit(str _splitString,str _splitchar,int _pos)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt; &amp;nbsp; List strlist=new List(Types::String);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ListIterator &amp;nbsp; &amp;nbsp;iterator;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; &amp;nbsp; &amp;nbsp; packedList;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; strlist=strSplit(_splitString,_splitchar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; iterator = new ListIterator(strlist);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while(iterator.more())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; packedList += iterator.value();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iterator.next();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return conPeek(packedList,_pos);&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;public static str encrypt(str _input, str _salt = &#39;&#39;)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Security.Cryptography.SHA512Managed &amp;nbsp;sha512managed = new System.Security.Cryptography.SHA512Managed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Text.Encoding &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;encoding = System.Text.Encoding::get_UTF8();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Byte[] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputBytes;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Byte[] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultBytes;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnString;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; new InteropPermission(InteropKind::ClrInterop).assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; inputBytes = encoding.GetBytes(strLwr(_salt) + _input); // Convert lower case salt + input into byte array&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // The input is hashed 1024 times for attack resiliency&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; 1024; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultBytes = resultBytes ? resultBytes : inputBytes; // First loop uses input for hashing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultBytes = sha512managed.ComputeHash(resultBytes);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; returnString = System.Convert::ToBase64String(resultBytes);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return returnString;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;private static Map fileGetList(FilePath &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_filePathArchive)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Map &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mapFiles;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InteropPermission &amp;nbsp; interopPermission = new InteropPermission(InteropKind::ClrInterop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Set &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interopPermissionSet = new Set(Types::Class);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.Array &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arrayFiles;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Granting file permission rights&lt;br /&gt;
&amp;nbsp; &amp;nbsp; interopPermissionSet.add(interopPermission);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::assertMultiple(interopPermissionSet);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; mapFiles = new Map(Types::String, Types::String); // Key = return file | Value = archive path&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!System.IO.Directory::Exists(&lt;b&gt;_filePathArchive&lt;/b&gt;))&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; &amp;nbsp;throw &amp;nbsp;error(&quot;Path doesnt exist&quot;);&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; arrayFiles = System.IO.Directory::GetFiles(&lt;b&gt;_filePathArchive&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // CLRInterop::getAnyTypeForObject method is used to handle difference in AX and System types (e.g. System.Int32 != int)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; CLRInterop::getAnyTypeForObject(arrayFiles.get_Length()); i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mapFiles.insert(CLRInterop::getAnyTypeForObject(arrayFiles.GetValue(i)),&amp;nbsp;&lt;b&gt;_filePathArchive&lt;/b&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Reverting file permission rights&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return mapFiles;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// &amp;nbsp;Gets the SenderID from AIF xml .&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;param name=&quot;messagePartsXml&quot;&amp;gt;&lt;br /&gt;
/// An &amp;lt;c&amp;gt;AifXml&amp;lt;/c&amp;gt; value.&lt;br /&gt;
/// &amp;lt;/param&amp;gt;&lt;br /&gt;
/// &amp;lt;returns&amp;gt;&lt;br /&gt;
/// An instance of the &amp;lt;c&amp;gt;str document Namespace&amp;lt;/c&amp;gt; class.&lt;br /&gt;
/// &amp;lt;/returns&amp;gt;&lt;br /&gt;
&lt;b&gt;public static str getSenderIDValue(AifXml messagePartsXml)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;XmlTextReader &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlReader;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str value,currentElement,pureElement;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
#Aif&lt;br /&gt;
&amp;nbsp; &amp;nbsp; xmlReader = XmlTextReader::newXml(messagePartsXml);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (xmlReader.Read())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (xmlReader.nodeType())&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; &amp;nbsp;case XmlNodeType::Element:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentElement = xmlReader.name();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case XmlNodeType::Text:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pureElement = subStr(currentElement,strFind(currentElement,&#39;:&#39;,1,256)+1,256);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (pureElement)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case &quot;SenderId&quot;:&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; &amp;nbsp; {&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=xmlReader.value();&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; return value;&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; &amp;nbsp; }&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; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return value;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1201322408719646185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/07/ax2012-useful-fucntions-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1201322408719646185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1201322408719646185'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/07/ax2012-useful-fucntions-2.html' title='Ax2012 Useful functions 2'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-6325939595650205717</id><published>2015-07-13T12:37:00.001+00:00</published><updated>2015-07-13T12:37:28.761+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>AX2012 Replacing Company element value in AIF using .net dll and QueryService</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Scenario:&lt;br /&gt;
In AIF we have some data coming from externalSystem, which externalSystem doesnt have anyinformation to which company it should load, as ExternalSystem knows the information about coRegNum as we have to find the right company in AX by using coRegNum.&lt;br /&gt;
Solution:&lt;br /&gt;
so I build a .net component where we use the dll in transformation to replace the companyelement in the header to pass the file into right company.&lt;br /&gt;
I am using QueryService which I querying the companyInfoTable with the range coRegNum and getting the right Company and replacing in the sourceXML in transfromation in headersection.&lt;br /&gt;
&lt;br /&gt;
sample xml section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ns0:Envelope xmlns:ns0=&quot;http://schemas.microsoft.com/dynamics/2011/01/documents/Message&quot;&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;ns0:Header&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;ns0:MessageId&amp;gt;354bcae9-45a5-411e-953f-e2920a6c0229&amp;lt;/ns0:MessageId&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;b&gt;&amp;lt;ns0:Company&amp;gt;123456&amp;lt;/ns0:Company&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;ns0:Action&amp;gt;http://schemas.microsoft.com/dynamics/2008/01/services/GeneralJournalService/create&amp;lt;/ns0:Action&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/ns0:Header&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;ns0:Body&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;ns0:MessageParts&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;ns0:LedgerGeneralJournal xmlns:ns0=&quot;http://schemas.microsoft.com/dynamics/2008/01/documents/LedgerGeneralJournal&quot; xmlns:st=&quot;http://schemas.microsoft.com/dynamics/2008/01/sharedtypes&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before writing this class add serviceReference&amp;nbsp;&lt;b&gt;QueryService from AX standardservice into your solution that will create app.config as below&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;lt;configuration&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;lt;system.serviceModel&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;bindings&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;netTcpBinding&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;binding name=&quot;QueryServiceEndpoint&quot; closeTimeout=&quot;00:01:00&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; openTimeout=&quot;00:01:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transactionFlow=&quot;false&quot; transferMode=&quot;Streamed&quot; transactionProtocol=&quot;OleTransactions&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostNameComparisonMode=&quot;StrongWildcard&quot; listenBacklog=&quot;10&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxBufferPoolSize=&quot;524288&quot; maxBufferSize=&quot;65536&quot; maxConnections=&quot;10&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxReceivedMessageSize=&quot;65536&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;readerQuotas maxDepth=&quot;32&quot; maxStringContentLength=&quot;8192&quot; maxArrayLength=&quot;16384&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxBytesPerRead=&quot;4096&quot; maxNameTableCharCount=&quot;16384&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;reliableSession ordered=&quot;true&quot; inactivityTimeout=&quot;00:10:00&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enabled=&quot;false&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;security mode=&quot;Transport&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;transport clientCredentialType=&quot;Windows&quot; protectionLevel=&quot;EncryptAndSign&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;message clientCredentialType=&quot;Windows&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/security&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/binding&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/netTcpBinding&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/bindings&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;client&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;endpoint address=&quot;net.tcp://KrishhDax:8201/DynamicsAx/Services/QueryService&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding=&quot;netTcpBinding&quot; bindingConfiguration=&quot;QueryServiceEndpoint&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contract=&quot;AXQueryService.IQueryService&quot; name=&quot;QueryServiceEndpoint&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;identity&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servicePrincipalName value=&quot;host/&lt;/b&gt;&lt;b&gt;KrishhDax&lt;/b&gt;&lt;b&gt;.adep01.nordic.rsa-ins.com&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/identity&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/client&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/system.serviceModel&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;lt;/configuration&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Create a tranform class which extends from Itransform.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;I am using xml.linq to read the element value in the class, so I referenced&amp;nbsp;&lt;/b&gt;System.Xml.Linq;&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using Microsoft.Dynamics.IntegrationFramework.Transform;&lt;br /&gt;
using System.Xml;&lt;br /&gt;
using System.Xml.Linq;&lt;br /&gt;
using KrishhIbanToCompanyTrans.AXQueryService;&lt;br /&gt;
using System.ServiceModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Net;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
namespace KrishhIbanToCompanyTrans&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public class &lt;b&gt;IBANToCompanyTrans : ITransform&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void Transform(System.IO.Stream input, System.IO.Stream output, string config)&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; XDocument inputXml = XDocument.Load(input);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string accStr = inputXml.Root.Descendants().Where(e =&amp;gt; e.Name.LocalName == &quot;Company&quot;).First().Value;&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; string[] serviceParams = config.Split(&#39;;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (serviceParams.Count() != 1 &amp;amp;&amp;amp; serviceParams.Count() != 4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ArgumentException(&quot;Invalid configuration passed. Expecting single endpoint address or endpoint address with username, password and domain, separated by ;&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NetTcpBinding binding1 = new NetTcpBinding();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EndpointAddress epa = new EndpointAddress(serviceParams[0]);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.Name = &quot;QueryServiceEndpoint&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.TransactionProtocol = TransactionProtocol.OleTransactions;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.TransferMode = TransferMode.Streamed;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.Security.Mode = SecurityMode.Transport;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.Security.Transport.ClientCredentialType = &amp;nbsp;TcpClientCredentialType.Windows;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.Security.Message.ClientCredentialType = MessageCredentialType.Windows;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; binding1.ReliableSession.Enabled = false;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QueryServiceClient serviceClient = new QueryServiceClient(binding1, epa);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (serviceParams.Count() == 4)&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; serviceClient.ClientCredentials.Windows.ClientCredential.UserName = serviceParams[1];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceClient.ClientCredentials.Windows.ClientCredential.Password = serviceParams[2];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceClient.ClientCredentials.Windows.ClientCredential.Domain = serviceParams[3];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QueryMetadata query = new QueryMetadata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query.DataSources = new QueryDataSourceMetadata[1];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query.Name = &quot;CompanyInfo&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QueryDataSourceMetadata queryDS = new QueryDataSourceMetadata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Name = &quot;CompanyInfo&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Table = &quot;CompanyInfo&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Enabled = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query.DataSources[0] = queryDS;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.DynamicFieldList = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Fields = new QueryDataFieldMetadata[2];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QueryDataFieldMetadata fieldId = new QueryDataFieldMetadata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldId.FieldName = &quot;DataArea&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldId.SelectionField = SelectionField.Database;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Fields[0] = fieldId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QueryDataFieldMetadata fieldName = new QueryDataFieldMetadata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldName.FieldName = &quot;CoRegNum&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fieldName.SelectionField = SelectionField.Database;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Fields[1] = fieldName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queryDS.Ranges = new QueryDataRangeMetadata[] { new QueryDataRangeMetadata() { TableName = &quot;CompanyInfo&quot;, FieldName = &quot;CoRegNum&quot;, Value = accStr, Enabled = true } };&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Paging paging = new ValueBasedPaging() { RecordLimit = 25 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSet dataset = serviceClient.ExecuteQuery(query, ref paging);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(dataset.GetXml());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataset != null)&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 (dataset.Tables.Count &amp;gt; 2)&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; &amp;nbsp; &amp;nbsp; if (dataset.Tables[3].Rows.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataRow dr = dataset.Tables[3].Rows[0];&lt;br /&gt;
&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; &amp;nbsp; var element = inputXml.Root.Descendants().Where(e =&amp;gt; e.Name.LocalName == &quot;Company&quot;).First();&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; &amp;nbsp; if (element != null)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.Value = dr[&quot;DataArea&quot;].ToString();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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; }&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; inputXml.Save(output);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
This method is used to test the above code.&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)&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; IBANToCompanyTrans transformClass = new IBANToCompanyTrans();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileStream input, output;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create the two streams to pass into the assembly. You will need to change these&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // to your file locations.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; input = new FileStream(&quot;C:\\Temp\\922\\922.xml&quot;, FileMode.Open);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = new FileStream(&quot;C:\\Temp\\922\\922_c.xml&quot;, FileMode.OpenOrCreate);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string paramString = &quot;net.tcp://hssdas115:8201/DynamicsAx/Services/QueryService&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Passes in the customers CSV file and gets back an XML file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transformClass.Transform(input, output, paramString);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Displays the XML to the console.&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; &amp;nbsp;StreamReader sreader = new StreamReader(new FileStream(&quot;c:\\temp\\testtmpn.xml&quot;, FileMode.Open));&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; &amp;nbsp;Console.Write(sreader.ReadToEnd());&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; &amp;nbsp;Console.ReadLine();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
After building this component, go to the inboundPort and click transformation button and go to transformations and create the .net dll &amp;nbsp;transformation and provide the dll and select the class in the dropdown.&lt;br /&gt;
in Config file provide the app.config file for this transformation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/6325939595650205717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/07/ax2012-replacing-company-element-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6325939595650205717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/6325939595650205717'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/07/ax2012-replacing-company-element-value.html' title='AX2012 Replacing Company element value in AIF using .net dll and QueryService'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-646441762486738418</id><published>2015-06-25T14:36:00.001+00:00</published><updated>2015-06-25T14:36:23.088+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><title type='text'>AIF Outbound Read ParentAXBC while processingRecord AX2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Scenario:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
In AIF outbound document service Exporting Invoices information,&lt;br /&gt;
In this document we have the customization as one table which contains the printTemplates where it stores the printTemplate information like,address,bankdetails,etc.Using this printTemplate number the external system will define which printing report they have to use.&lt;br /&gt;
The Requirement is &amp;nbsp;The Address containes all the street,country,etc. these information we have to generate from translation tables based on the language that defined in the custinvoiceJournal.&lt;br /&gt;
&lt;br /&gt;
so the datasource lookes like this.&lt;br /&gt;
custinvoicejour-&amp;gt;custinvoicetrans,custTable,etc, as well printTemplateTable also outerjoins to the custinvoicejour.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I didnt find the way where I can get the parentaxbc object while processing the current record.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;
I thought to get parentAXBC object always for the outbound for the current AXBC record.&lt;br /&gt;
&lt;br /&gt;
See the Modification that I have build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. &lt;b&gt;AXDBase class&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;added the class variable as &lt;b&gt;AXInternalBase parentAXBC;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2.&lt;b&gt; AxdBaseRead class&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Open method &lt;b&gt;serializeRecord &lt;/b&gt;add the folllowing line of code above&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AXbase.ProccesingRecord(common) &lt;/b&gt;line in that method&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;axdBase.parmParentAxBC(_parentAxBC);&lt;/b&gt;&lt;span style=&quot;font-size: 7.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3.&amp;nbsp;&lt;span style=&quot;font-family: Consolas;&quot;&gt;AxdBaseGenerateXSD class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp;Open this class edit method &lt;b&gt;addDocumentProperties &lt;/b&gt;and add one more case for classType as below, so that while serialization class object wont fail.&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 7.5pt;&quot;&gt;// added
by krishna for to check for class type also. begins&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt; Types::Class:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; (typename == &lt;/span&gt;&lt;span style=&quot;color: darkred; font-family: Consolas;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;typename =
#xsdStringType;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;typeNameSpace
= #xsdNameSpace ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
















&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;// added
by&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 7.5pt;&quot;&gt; krishna for to check for class type also.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 7.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;i&gt;Now framework was updated to get parentAXBC allways while outbound. now you can write logic whatever you want to use it.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open AXDSalesInvoice class and update the processing record with the business logic for you to handle.&lt;br /&gt;
It this method i am verifying the current record in printTemplate then get the parent and get the languageId from that do my logic.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;public&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;void&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;
processingRecord(Common common)&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;PrintTemplate PrintTemplate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;AxCustInvoiceJour
axCustInvoiceJour;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;if&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;(common.TableId == &lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;tableNum&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;(PrintTemplate))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;axCustInvoiceJour=this.parmParentAxBC();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;PrintTemplate=common;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;PrintTemplate.CompanyCountryName=LogisticsAddressCountryRegionTranslation::find(LogisticsPostalAddress::findRecId(PrintTemplate.Address).CountryRegionId,axCustInvoiceJour.parmLanguageId()).ShortName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;super&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;(PrintTemplate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;super&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;(common);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
































&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;}&lt;span style=&quot;color: green;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;If you guys likes this post and useful please like and share it.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 7.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/646441762486738418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/06/aif-outbound-read-parentaxbc-while.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/646441762486738418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/646441762486738418'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/06/aif-outbound-read-parentaxbc-while.html' title='AIF Outbound Read ParentAXBC while processingRecord AX2012'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-3191599489124254815</id><published>2015-06-25T14:04:00.002+00:00</published><updated>2015-06-25T14:04:44.109+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="forms"/><title type='text'>Editable Multi select lookup in Grid field AX2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Scneario: Multiple select Editable lookup &amp;nbsp;in grid&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I created an extension of class from &lt;b&gt;SysLookupMultiselectGrid&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: darkblue; font-family: Consolas; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;&amp;nbsp;KrisSysLookupMultiSelectGrid &lt;/span&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas; font-weight: bold;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt; SysLookupMultiSelectGri&lt;/b&gt;d&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;#Characters&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt; setSelected()&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;dictfield
dictField;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;Common
currentDSRecord;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;FormDataSource
formdatasource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;callingControlId.text(SysOperationHelper::convertMultiSelectedValueString &amp;nbsp; &amp;nbsp; &amp;nbsp; (selectedId));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;formdatasource
= callingControlId.dataSourceObject();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;&amp;nbsp;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;(formdatasource
&amp;amp;&amp;amp; callingControlStr.dataField())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; dictfield = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;
dictfield(formdatasource.table(),callingControlStr.dataField());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp;currentDSRecord
= formdatasource.cursor();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp;currentDSRecord.(dictfield.id())
= currentDSRecord.(dictfield.id()) + &amp;nbsp; &amp;nbsp; SysOperationHelper::convertMultiSelectedValueString(selectedStr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; callingControlStr.update();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;&amp;nbsp;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;callingControlStr.text(SysOperationHelper::convertMultiSelectedValueString(selectedStr));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;




































&lt;span style=&quot;font-family: Consolas;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;KrisSysLookupMultiSelectGrid&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;construct(FormControl _ctrlId,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;FormControl
_ctrlStr)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;KrisSysLookupMultiSelectGrid&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;lookupMS;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;lookupMS = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;KrisSysLookupMultiSelectGrid&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;lookupMS.parmCallingControlId(_ctrlId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;lookupMS.parmCallingControlStr(_ctrlStr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; lookupMS;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
















&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;}&lt;span style=&quot;font-size: 7.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;On form declare this class on the form level as below&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;KrisSysLookupMultiSelectGrid&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;multiSelectGrid;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;On form Init method initiliaze this object as below&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;multiSelectGrid
=&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;KrisSysLookupMultiSelectGrid&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;::construct(GridResults_Value,GridResults_Value);&lt;/b&gt;&lt;span style=&quot;font-size: 7.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;On grid string edit field lookup method you can use this object as below&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;Query query = &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt; Query();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;


&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;QueryBuildDataSource queryBuildDataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;queryBuildDataSource = query.addDataSource(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;tableNum&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;(DimensionAttribute));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;queryBuildDataSource.addRange(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;fieldNum&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;(DimensionAttribute,Type)).value(queryValue(DimensionAttributeType::CustomList));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;queryBuildDataSource.addRange(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;fieldNum&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;(DimensionAttribute,Type)).value(queryValue(DimensionAttributeType::MainAccount));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;queryBuildDataSource.addRange(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;fieldNum&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;(DimensionAttribute,Type)).value(queryValue(DimensionAttributeType::ExistingList));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;queryBuildDataSource.addSelectionField(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: darkblue; font-family: Consolas;&quot;&gt;fieldNum&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;(DimensionAttribute,Name));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;multiSelectGrid.parmQuery(query);&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;











&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;multiSelectGrid.run();&lt;/b&gt;&lt;span style=&quot;font-size: 7.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;you can see in form as below screenshot&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&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/AVvXsEgkdnQQQdQn02Y0UMTWnZ5O2S2UB6gVWl5WN1FEOsXsKW6nzbM126lXQwTMzeFxDELeQ8FWez3L7LuX4m9BigreCOQfl-V1Jb96Cgo5cfg0YnPqudGjiIZZCuGT-rC-X4EwcPU9cOBNXHI/s1600/blog2pic1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;339&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkdnQQQdQn02Y0UMTWnZ5O2S2UB6gVWl5WN1FEOsXsKW6nzbM126lXQwTMzeFxDELeQ8FWez3L7LuX4m9BigreCOQfl-V1Jb96Cgo5cfg0YnPqudGjiIZZCuGT-rC-X4EwcPU9cOBNXHI/s640/blog2pic1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgGp6fEhsiupGrZdCvhHPjX-NUXlmKVGL6VxJaROHzLjBFho5eEyDDSkrRW25BiY_Kl5dECW_Dfc5XC5DUKpFlwoHSJwTHH7RWm6wd0UNSEA9BkMYU5KStex7CRaBXYBl5bEmV9fyaMOwE/s1600/blog2pic2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGp6fEhsiupGrZdCvhHPjX-NUXlmKVGL6VxJaROHzLjBFho5eEyDDSkrRW25BiY_Kl5dECW_Dfc5XC5DUKpFlwoHSJwTHH7RWm6wd0UNSEA9BkMYU5KStex7CRaBXYBl5bEmV9fyaMOwE/s640/blog2pic2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;Its editable and multi select lookup.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
















&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/3191599489124254815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/06/editable-multi-select-lookup-in-grid.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3191599489124254815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3191599489124254815'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/06/editable-multi-select-lookup-in-grid.html' title='Editable Multi select lookup in Grid field AX2012'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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/AVvXsEgkdnQQQdQn02Y0UMTWnZ5O2S2UB6gVWl5WN1FEOsXsKW6nzbM126lXQwTMzeFxDELeQ8FWez3L7LuX4m9BigreCOQfl-V1Jb96Cgo5cfg0YnPqudGjiIZZCuGT-rC-X4EwcPU9cOBNXHI/s72-c/blog2pic1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7061588288131344016.post-3943128288318673847</id><published>2015-06-25T13:36:00.001+00:00</published><updated>2015-06-25T13:37:19.987+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AIF"/><category scheme="http://www.blogger.com/atom/ns#" term="Ax2012"/><title type='text'>AIF Inheritance Extending AXD classes AX2012 </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;Scenario:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;I have multiple
ledgerTransaction files coming from different source systems to AX, so each
file import must have different business logic,business handlings regarding the
dimensions, type of files ex ledger,cust,bank,vend.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;I build the whole
logic in the standard AXDLEdgerGeneralService class in deserializeEntity method
with journalNames I handled, but its becoming more complex and to maintain the
functionality and growing business requirements, its getting messing in the code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;I designed the
inheritance for AIF documents, For each inbound we can have different axdclass
with their own business logic implemented and I defined which axdclass that you
want to run on that inbound port. It became easier to maintain the code and standard
class is same as Standard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;I thought to share
as it may be useful for lot of people.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;abstract&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8pt;&quot;&gt;&lt;b&gt; &lt;span style=&quot;color: darkblue;&quot;&gt;class&lt;/span&gt; AifDocument &lt;span style=&quot;color: darkblue;&quot;&gt;extends&lt;/span&gt;
AfStronglyTypedDataContainer&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;classId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
axdClassId;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AxdBase&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; axdInstance;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AifXml&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; documentXml;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;boolean&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; documentXmlExists;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;boolean&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deserializeNow;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-weight: bold;&quot;&gt;&lt;b&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;b&gt;
classId parmAXDClassId(classId _classId=axdClassId)&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
axdClassId=_classId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;return&lt;/span&gt;
axdClassId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Add field &lt;b&gt;ClassId &lt;/b&gt;in table &lt;b&gt;AIFInboundPort
&lt;/b&gt;which extends &lt;b&gt;classID &lt;/b&gt;EDT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Create an Edit method in this table&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;b&gt;edit className name(boolean set, Classname value)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;classid classID;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(set)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;classid=classname2id(value);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.classid=classid;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value = classid2name(this.classid);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Create an &lt;b&gt;inMemmory &lt;/b&gt;table &lt;b&gt;AifAxdClassLookup
&lt;/b&gt;with the field &lt;b&gt;ClassName &lt;/b&gt;of EDT Name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Edit the form &lt;b&gt;aifinboundPort &lt;/b&gt;and add a method at element level&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Declare
a variable at form level as &lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;AifAxdClassLookup aifAxdClassLookup;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Add &lt;b&gt;AXDClass &lt;/b&gt;string edit control on details
header group. define Datamethod &lt;b&gt;Name&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Add &lt;b&gt;progress &lt;/b&gt;control under details
header&amp;nbsp; group and name it as &lt;b&gt;progress&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Create element level method as below, we
will use this method in the lookup of the &lt;b&gt;AXDclass &lt;/b&gt;string edit control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;
&lt;b&gt;generateAXDClassesLookupTable()&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AXDBase componentInstance;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Dictionary dictionary;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SysDictClass dictClass;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;int&lt;/span&gt;&lt;/b&gt; i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;int&lt;/span&gt;&lt;/b&gt; classCount;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
classId componentInterfaceId,componentInterfaceId1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SysTableLookup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
sysTableLookup;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dictionary = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;
Dictionary();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
componentInterfaceId1=&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;classNum&lt;/span&gt;&lt;/b&gt;(AxdLedgerGeneralJournal);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
classCount = dictionary.classCnt();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.rangeLo(&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.rangeHi(classCount);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.pos(&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.step(&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.visible(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;for&lt;/span&gt;&lt;/b&gt; (i=&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;; i &amp;lt;= classCount; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; progress.pos(i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dictClass = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;
SysDictClass(dictionary.classCnt2Id(i));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(dictClass.isImplementing(componentInterfaceId1))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; componentInstance =
dictClass.makeObject();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;AifAxdClassLookup&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;.clear();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;AifAxdClassLookup&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;.ClassName =
dictClass.name();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;AifAxdClassLookup&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;.insert();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
progress.visible(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
componentLookupGenerated = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Override the lookup method of AXDClass
string edit control and add below code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;void&lt;/span&gt;&lt;/b&gt; lookup()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
SysTableLookup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Query&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
QueryBuildDataSource&amp;nbsp;&amp;nbsp;&amp;nbsp;
queryBuildDataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (componentLookupGenerated
== &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
element.generateAXDClassesLookupTable();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
query = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt; Query();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
queryBuildDataSource = query.addDataSource(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tablenum&lt;/span&gt;&lt;/b&gt;(AifAxdClassLookup));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup = SysTableLookup::newParameters(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tablenum&lt;/span&gt;&lt;/b&gt;(AifAxdClassLookup),
this);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup.addLookupfield(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldnum&lt;/span&gt;&lt;/b&gt;(AifAxdClassLookup,
ClassName));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup.parmQuery(query);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//BP Deviation Documented.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup.parmTmpBuffer(AifAxdClassLookup);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup.parmUseLookupValue(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
tableLookup.performFormLookup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Modify the service class ex:
ledgerGeneralService class in my case its ledgerGeneralJournalService&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;[AifDocumentCreateAttribute,
SysEntryPointAttribute(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt; AifEntityKeyList
create(LedgerGeneralJournal _ledgerGeneralJournal)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AifInboundPort aifInboundPort;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ClassId AxdClassId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Assign inheritance extension AXDclass for
each port defined on the inboundPort added by krishna.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;if&lt;/span&gt;
(operationContext != &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AxdClassId=aifInboundPort::find(operationContext.getPortName()).&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;ClassId&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;if&lt;/span&gt;(AxdClassId!=&lt;span style=&quot;color: red; mso-bidi-font-weight: bold;&quot;&gt;0&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_ledgerGeneralJournal.parmAXDClassId(AxdClassId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//assign inheritance extension AXDclass for
each port defined on the inboundPort added by krishna.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;
this.createList(_ledgerGeneralJournal);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now we will create a class which extends
AXDclass ex: AXDLedgerGeneralJournal&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-weight: bold;&quot;&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;b&gt;
AxdLedgerGeneralJournal_GeneralALL &lt;span style=&quot;color: darkblue; mso-bidi-font-weight: bold;&quot;&gt;extends&lt;/span&gt; AxdLedgerGeneralJournal&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;Override the queryName method and
use which query you are using for your inbound AIF&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;In my example I am using
AXDLedgerGeneralJournal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;b&gt; QueryName
getQueryName()&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;return&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;querystr&lt;/span&gt;&lt;/b&gt;(AxdLedgerGeneralJournal);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8pt;&quot;&gt;Now you can
override whatever the method you want to overiride, in my case I am overriding
deserializeentity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8pt;&quot;&gt;This method
contains all my modification logic.&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8.0pt;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&lt;b&gt; &lt;span style=&quot;color: darkblue;&quot;&gt;void&lt;/span&gt; afterDeserializeEntity(AxInternalBase
_axbc, tableId _tableId, &lt;span style=&quot;color: darkblue;&quot;&gt;str&lt;/span&gt;
_dataSourceName)&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AxdBaseProperty axdBaseProperty = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;new&lt;/span&gt;&lt;/b&gt;
AxdBaseProperty();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;container&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionValue,
axdBasePropertyContainer, dimensionValueConverted,bankDimensionContainer;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
recId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dimensionFieldRecId,bankDimensionFieldRecid;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerElementIndex = &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerLength;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
selectableDataArea company, offsetCompany;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
BankAccountTable localBankAccountTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AccountStatementRules AccountStatementRules;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
JournalNameId localJournalName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
LogisticsPostalAddressView&amp;nbsp;&amp;nbsp;&amp;nbsp;
locallogisticsPostalAddressView;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
LogisticsLocationParty&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
logisticslocationParty;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
CustTable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
localCustTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
MappingText&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localMappingText=&lt;span style=&quot;color: darkred;&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
localJournalName=&lt;span style=&quot;color: darkred;&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dimensionFieldRecId=&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;/b&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
containerLength = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conLen&lt;/span&gt;&lt;/b&gt;(fieldList);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (containerLength == &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;/b&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;(_tableId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ledgerJournalName =
LedgerJournalName::find(_axbc.parentAxBC().fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(ledgerJournalTable,
JournalName)));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;(_tableId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTable))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ledgerJournalName =
LedgerJournalName::find(_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(ledgerJournalTable,
JournalName)));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;(ledgerJournalName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ateAccountDefinitionId =
ATEAccountDefinitionTable::findRecId(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ledgerJournalName.ATEAccountDefinitionTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ).DefinitionId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (_tableId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, Company));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offsetCompany&amp;nbsp;&amp;nbsp; = _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetCompany));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = AifLookupEntry::findInternal(SystemParameters::find().LookupTableId,company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offsetCompany&amp;nbsp;&amp;nbsp; =
AifLookupEntry::findInternal(SystemParameters::find().LookupTableId,offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;(LedgerJournalName::find(_axbc.parentAxBC().fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(ledgerJournalTable, JournalName))).JournalName==&lt;span style=&quot;color: darkred;&quot;&gt;&quot;1234&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;curext&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offsetCompany&amp;nbsp;&amp;nbsp; =&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;curext&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(company)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, Company),
company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;curext&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, Company),
company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(offsetCompany)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, OffsetCompany),
offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offsetCompany&amp;nbsp;&amp;nbsp; =&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;curext&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, OffsetCompany),
offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//
Validate the primary and offset companies.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.validateCompany(_axbc.currentRecord(),
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans), &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, Company),
company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
this.validateCompany(_axbc.currentRecord(), &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans),
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetCompany), offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; axdBasePropertyContainer = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conPeek&lt;/span&gt;&lt;/b&gt;(fieldList, containerElementIndex);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
axdBaseProperty.unpack(axdBasePropertyContainer);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerElementIndex++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionValue = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conPeek&lt;/span&gt;&lt;/b&gt;(fieldList, containerElementIndex);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; containerElementIndex++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldId =
axdBaseProperty.parmImplementingFieldId();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;// If the
Table number and Field number match then convert the field by calling
axdDimensionUtil&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;// and set
the corresponding field through its parm method.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(_tableId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTable)
&amp;amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTable,
OffsetLedgerDimension))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//
MultiTypeDefaultAccount requires an account type to be specified.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//return
AxdDimensionUtil::getMultiTypeDefaultAccountId(_accountTypeEnumId,
_accountType, _dimensionValue);&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getMultiTypeDefaultAccountId(enumName2Id(&lt;span style=&quot;color: darkred;&quot;&gt;&#39;LedgerJournalACType&#39;&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTable,
OffsetAccountType)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dimensionValue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTable, OffsetLedgerDimension),
dimensionFieldRecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (_tableId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;tableNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(fieldId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
LedgerDimension))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(ateAccountDefinitionId)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionValueConverted
= this.ConvertLedgerdimension_PC(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
ExternalAccountString))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, Company))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, CurrencyCode))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,
LedgerJournalName::find(_axbc.parentAxBC().fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(ledgerJournalTable,
JournalName))).JournalName); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (BankAccountTable::exist(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conPeek&lt;/span&gt;&lt;/b&gt;(dimensionValueConverted,&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;2&lt;/span&gt;&lt;/b&gt;)))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, AccountType),
LedgerJournalACType::Bank);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,DefaultDimension),BankAccountTable::find(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conPeek&lt;/span&gt;&lt;/b&gt;(dimensionValueConverted,&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;2&lt;/span&gt;&lt;/b&gt;)).DefaultDimension);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getMultiTypeAccountId(enumName2Id(&lt;span style=&quot;color: darkred;&quot;&gt;&#39;LedgerJournalACType&#39;&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
AccountType)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dimensionValueConverted,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Non ATE starts&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getMultiTypeAccountId(enumName2Id(&lt;span style=&quot;color: darkred;&quot;&gt;&#39;LedgerJournalACType&#39;&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
AccountType)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dimensionValue,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//
Else Non ATE closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, LedgerDimension),
dimensionFieldRecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;// IF
ledgerJournalTrans ledgerDimensionClosed field is closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (fieldId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetLedgerDimension))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;
(ateAccountDefinitionId)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionValueConverted =
this.ConvertLedgerdimension_PC(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetAccountString))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, OffsetCompany))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans, CurrencyCode))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
,LedgerJournalName::find(_axbc.parentAxBC().fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(ledgerJournalTable,
JournalName))).JournalName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getMultiTypeAccountId(enumName2Id(&lt;span style=&quot;color: darkred;&quot;&gt;&#39;LedgerJournalACType&#39;&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetAccountType)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dimensionValueConverted,&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//dimensionValue,&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//
ATE offset closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getMultiTypeAccountId(enumName2Id(&lt;span style=&quot;color: darkred;&quot;&gt;&#39;LedgerJournalACType&#39;&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetAccountType)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dimensionValue,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//ELse non
ATE&amp;nbsp; offset closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetLedgerDimension), dimensionFieldRecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Else
if OffsetLedger dimension closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (fieldId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
DefaultDimension))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getDimensionAttributeValueSetId(dimensionValue, company);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
DefaultDimension), dimensionFieldRecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Else
if Default dimension closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;if&lt;/span&gt;&lt;/b&gt; (fieldId == &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetDefaultDimension))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//
OffsetDefaultDimension requires a Legal entity to be specified to support
intercompany transactions.&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimensionFieldRecId =
AxdDimensionUtil::getDimensionAttributeValueSetId(dimensionValue,
offsetCompany);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _axbc.fieldId(&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;fieldNum&lt;/span&gt;&lt;/b&gt;(LedgerJournalTrans,
OffsetDefaultDimension), dimensionFieldRecId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Else
if OffsetDefault dimension closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//IF
ledgerJournalTrans table check closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;i&gt;&lt;span style=&quot;color: green;&quot;&gt;//Do while closed&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;while&lt;/span&gt;&lt;/b&gt; (containerElementIndex
&amp;lt; containerLength);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
fieldList = &lt;b&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;conNull&lt;/span&gt;&lt;/b&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&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-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Consolas; font-size: 8.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: darkblue; font-family: Consolas; font-size: 8pt;&quot;&gt;If you guys likes this post please share it and like this post.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-size: 10.6666669845581px;&quot;&gt;if you have any queries please contact and message me.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/3943128288318673847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/06/aif-inheritance-extending-axd-classes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3943128288318673847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/3943128288318673847'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/06/aif-inheritance-extending-axd-classes.html' title='AIF Inheritance Extending AXD classes AX2012 '/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-1379927542161093580</id><published>2015-03-09T13:25:00.000+00:00</published><updated>2015-03-09T13:25:29.885+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample code"/><title type='text'>List out elements not added to version control from project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This job is used to list all elements not added to tfs(due to tfs) in project.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;static void Krishh_projectElementsNotaddedtoTFS(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Treenode parentNode,childnode;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; TreenodeIterator rootiterator;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; VersionControl vs;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ProjectNode &amp;nbsp;pln,plnproj;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ProjectListNode list;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; vs=new VersionControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; vs.init();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; parentNode = infolog.projectRootNode();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; list=infolog.projectRootNode().AOTfindChild(&quot;Private&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rootiterator=list.AOTiterator();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; pln=list.AOTfindChild(&quot;Testproject&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; plnproj=pln.loadForInspection();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rootiterator=plnproj.AOTiterator();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; childnode=rootiterator.next();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while(childnode)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(vs.allowCreate(childnode))&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; info(childnode.AOTname());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; childnode=rootiterator.next();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/1379927542161093580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2015/03/list-out-elements-not-added-to-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1379927542161093580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/1379927542161093580'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2015/03/list-out-elements-not-added-to-version.html' title='List out elements not added to version control from project'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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-7061588288131344016.post-2505170914288763402</id><published>2014-12-04T09:25:00.001+00:00</published><updated>2014-12-04T09:25:52.393+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ax 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="X++"/><title type='text'>Get Multiple files from Folder</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;static container Krishh_findMatchingFiles(&lt;/b&gt;str _folderPath, &amp;nbsp; str _filePattern &amp;nbsp; = &#39;*.*&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.IO.DirectoryInfo &amp;nbsp; &amp;nbsp; directory;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.IO.FileInfo[] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;files;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.IO.FileInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;file;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; InteropPermission &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permission;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; counter &amp;nbsp; &amp;nbsp; filesCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; counter &amp;nbsp; &amp;nbsp; loop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; mathchingFiles;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; permission &amp;nbsp;= new InteropPermission(InteropKind::ClrInterop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; permission.assert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; directory &amp;nbsp; = new System.IO.DirectoryInfo(_folderPath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; files &amp;nbsp; &amp;nbsp; &amp;nbsp; = directory.GetFiles(_filePattern);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; filesCount &amp;nbsp;= files.get_Length();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (loop = 0; loop &amp;lt; filesCount; loop++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= files.GetValue(loop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= file.get_FullName();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mathchingFiles &amp;nbsp;= conins(mathchingFiles, conlen(mathchingFiles) + 1, fileName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CodeAccessPermission::revertAssert();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return mathchingFiles;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
I placed the above method in Global class, so we can use that in your classes.&lt;br /&gt;
Make sure your folder should have access permissions when you are running in the batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;static void Krishh_fetchFiles(Args _args)&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; container &amp;nbsp; files;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; counter &amp;nbsp; &amp;nbsp; loop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; str &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//Assign the folder path with the file pattern if you want to filter by ex *.txt or k*.txt or m*.*..etc.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; files = Global::Krishh_findMatchingFiles(AxdDocumentParameters::find().PaymJournalFile);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (loop = 1; loop &amp;lt;= conlen(files); loop++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = conpeek(files, loop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info(fileName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://krishhdax.blogspot.com/feeds/2505170914288763402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://krishhdax.blogspot.com/2014/12/get-multiple-files-from-folder.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2505170914288763402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7061588288131344016/posts/default/2505170914288763402'/><link rel='alternate' type='text/html' href='http://krishhdax.blogspot.com/2014/12/get-multiple-files-from-folder.html' title='Get Multiple files from Folder'/><author><name>krishhDAX</name><uri>http://www.blogger.com/profile/15033137697713945322</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></feed>