| Santosh.'s profileDynamics AxPhotosBlogLists | Help |
|
November 25 My Blog - Microsoft Dynamics Related Community Site :) :) :)
Today I received a mail from MS approving my AX Blog as a Microsoft Dynamics Related Community site. It gives me immense pleasure to announce you that my blog is a Microsoft Dynamics Related Community site.
My Microsoft Dynamics Related Community site can be viewed from the following link https://community.dynamics.com/content/axblogs.aspx?groupid=21
Also a blog post is written introducing me to the MS community:
Thank you to one and all for your constant support. November 16 Create/Delete Customer using AIF Service Class in Dynamics AXThe Application Integration Framework allows us to create/update/delete or read data. Now in AX2009 we have a facility of creating/deleting records using AIF Service classes. There is "NO ADDITIONAL AIF SETUP"(Like Enabling Endpoints etc.) required to execute the code via service class. The services can be used to read/write data in AX. X++ service class job is illustrated below.
November 14 Documentation resources for Microsoft Dynamics AX 2009The Technical white paper "Documentation resources for Microsoft Dynamics AX 2009" has been published. This white paper provides information about the documentation that is available for users, IT administrators, and developers.
Download Center: http://www.microsoft.com/downloads/details.aspx?FamilyID=f4471844-dc4b-4e19-b2c9-c19442ab2991
Customer Source: https://mbs.microsoft.com/customersource/documentation/whitepapers/ax2009_docresources.htm
Partner Source: https://mbs.microsoft.com/partnersource/deployment/documentation/whitepapers/ax2009_docresources.htm
Technical white paper document provides the links on all of the following in a single click
November 11 AX Spell Checker Suggestion“SysSpellChecker” as the name suggest checks the spelling mistake and provides you with the list of spellings that may be useful or applicable. Sample job is illustrated using SysSpellChecker class. AX spell checker class is integrated with Word where methods like below are provided by COM classes. · activeSpellingDictionary · Checkspelling · getSpellingSuggestions
Above example is shown using AX class. But using COM class we can still get the suggested spellings if it’s incorrect.
Happy Spell check November 02 What is the “Message Limit Of INFOLOG” in Dynamics AX?AX Developers just play around with infolog framework provided by Microsoft. But did we ever know what the maximum limit which an infolog can hold? Well… The answer is quite simple. Quick Lab:
Run the following job and it would result in the following warning: “The number of messages exceeds the limit of the Infolog (10000.)” So maximum “MESSAGE LIMIT OF THE INFOLOG” in AX is 10000(By Default). But wait!!!!!! you can still increase this limit of an infolog??? These messages is generated during the build of the tree, the rest of the Infolog-messages will be skipped, but are available in the temptable sysinfolog. There is another limit, errorsPerBatch, an info-method too, this limit will be checked every time you add a message to the Infolog AND during the build of the tree. October 28 Difference b/w SELECT AND FIELDSELECT in Dynamics AXHi, X++ contains special language feature (i.e. embedded SQL).So we use select query in X++ directly to fetch/retrieve data. SELECT in Dynamics AX can be distinguished into two types. · normal Select · field Select There is a difference between a normal select statement and a field select statement:
Example:
Sample job is illustrated above. Have a hAppYyYyYyYyYy dAxzinggggggggg October 16 Get File Encoding in Dynamics AX using X++Hi All, Recently there was an interesting query from one of the technical forum. Publisher: http://objectmix.com/axapta/789064-get-file-encoding.html Question: How to get encoding file format from xml in Dynamics AX? Answer: I have created a small class which would retrieve the encoding format of an Xml. Approach Followed: · Class receives input file as string. · Based on the input file, the XmlReader is initialized. · Xml is read using read () method from XmlReader · When xmlReader.name () is equal to the XmlEncodingAttribute then encoding format is returned. Second part of question is possible convert it to ANSI before reading? Instead of trying to convert a file in ANSI it would be better we use Binary class to read and write data in the binary format even though if there is special character in the file. Since reading with ASCIIIO will only support NON ASCI character so binary is the better option. Here is the sample example using BinData kernel class:
Happy Daxinggggggggg October 01 Conduit - Customize Your Own ToolbarNote: Please feel free to use them for your own use with discretion. Hi All I have become a user in Conduit! Well what is Conduit? It’s a free website which allows creating/customizing your own Toolbar. So we can create our own free custom toolbar and stay connected to users even if they are surfing other website. I have created my own toolbar for Dynamics AX which has my blog link as AX icon
You can also download my Toolbar for your IE or any other browser from the following link http://dynamicsax.ourtoolbar.com/
Having your own toolbar is always a joy J Why can’t we have it one? Happy dAXinG.................................. September 29 How to Display Table,Query field value in Xml.Hi Everyone, In table, query, view we have a system method as xml () which is used to display field value in Xml. The structure of table/query is created as Xml. This method gives you the feasibility of populating the fields directly in xML without actually using the xML Classes available in AX. Please find the following examples below: Using Table: static void TableFieldsAsxML(Args _args) CustTable custTable; xmlDocument = new XmlDocument(); select firstonly custTable _xml = custTable.xml(1);
Using Query:
static void QueryAsxML(Args _args) Query q; q = new Query();
qbd = q.addDataSource(tableNum(CustTable)); qbr = qbd.addRange(fieldNum(CustTable, AccountNum)); qbr.value(#CustAccountNum); qbd.addSortField(fieldNum(CustTable, Name)); qr = new QueryRun(q); xmlDocument = new XmlDocument();
_xml = q.xml(1); xmlDocument.loadXml(_xml); xmlDocument.save(WinApi::getTempPath() + #AOTDelimiter + strins(strrem(xmlDocument.name(), '#'), #xmlFileName, strlen(xmlDocument.name()) + 1)); } ![]() This way you can use the system xml() function view a given file in xml. September 18 AX Add-insComing Soon..................................
Add-ins which are useful to Developer
1) Listing Mandatory Fields in tables without actually traversing to AOT.
2) AOT Browser - Without Manual UI Interaction.
September 09 Error occurred executing stored procedure when creating session for the AOSPlease Note: All this code snippets are a result of some development that came up from time to time. Please feel free to use them for your own use with discretion.
In AX2009 I tried manually creating DB and pointing Dynamics server to the created DB. When trying to start the AX services I ended up facing following errors.
On viewing the event viewer under Application you will clearly see there is a login failure issue
So you need to manually change the log on password under Dynamics AX service properties. Again when AX service was restarted there was another error.
In the event viewer you’ll see the following error
What is the error all about? When AX is installed through setup.exe, stored procedures are internally created for the Database. The two stored procedures that gets created are · CREATESERVERSESSIONS · CREATEUSERSESSIONS à This creates the User Session So when DB is created manually in SQL, the stored procedure is not available because of which AX service is not started successfully.
Solution: For the DB which are created manually make sure you create the stored procedure successfully in order to point to AX server.
STORED PROCEDURE FOR CREATESERVERSESSIONS http://cid-264a0056cbcbb1d3.skydrive.live.com/self.aspx/.Public/CREATESERVERSESSIONS.sqlSTORED PROCEDURE FOR CREATEUSERSESSIONS http://cid-264a0056cbcbb1d3.skydrive.live.com/self.aspx/.Public/CREATEUSERSESSIONS.sql
Run the stored procedure SCRIPTS and then try to restart AX service. You’ll successfully be able to point to the newly created Database. July 15 AIF Outbound Setup in AX2009Usage of AIF in AX is increasing day by day. I have taken the pain of explaining the outbound setup process in AIF using File System Adapter. Path to Download the Setup: http://cid-264a0056cbcbb1d3.skydrive.live.com/self.aspx/.Public/AIF%7C_Ax2009.docx This document explains in depth process involved for configuring AIF. AIF in comparsion to AX2009 with AX40 has improved features. · Actions which were used in AX40 is now scrapped in AX2009 and is completely dealt with web service · Create; read, update, and delete (CRUD) operations are now supported. · The programming model for AIF supports document services that encapsulate business logic and are the interface to external systems. · AIF provides functionality for consuming external Web services from within X++. · Performance improvements include the ability to scale up and handle more messages through parallel message processing and the addition of multiple AOSs. · New document services for additional commonly-used documents. The AIF architecture showing the transport layers above and the business logic layers below.
Consuming Web Services in Microsoft Dynamics AX 2009 White Paper (By Sanjay Jain) Microsoft Dynamics AX 2009 Server and Database Administration Guide http://www.microsoft.com/downloads/details.aspx?FamilyId=E7BFB7A8-EB99-4171-B75A-D9A37067BC19&displaylang=en#filelist In future I would also be adding the process involved for Configuring and Processing Inbound through AIF July 09 Enable/Disable keys using Task Macro in Dynamics AXHi,
Back again with one more small trick J. How to restrict access for users perform any task on AX forms? I tried implementing this using Task macro. Here is the detailed procedure for it.
In AOT Task Macro (\Macros\Task)
· Define Task-ID values, to be used with form Control’s
Note: To know any task id in AX. Put the debugger in the \Classes\SysSetupFormRun\task and observe the watch window for the value of _p1 (task id)
· Now place the following code in \Classes\SysSetupFormRun\task before super() call
//Disable Hide/Setup/Go to Main Table Task if (_p1 == #taskFilterHide || _p1 == #taskFilterSetup || _p1 == #taskMainTable) { Box::info ("@SYS81158", strfmt ("@SYS72189"));
if (DialogButton::Ok) return 0; }
Now if any of above action is performed then user will end up seeing no access rights
July 01 Error: Cannot execute a data definition language command on ().Hi All, I would like to share a job which i found in a technical forum. Most of us would have ran into issue "SQL database error" when data is loaded in Dynamics AX. In order to fix it please run through the job found in the attached link. http://axforum.info/forums/showthread.php?t=16251&highlight=execute+data+definition+language+command.
Happy dAxInG................ June 18 Configuration Key Status Using X++ CodeAs we are aware, Configuration key controls access to specific feature. To know about the status of a configuration key, the user has to traverse Administration->Setup->System-> Configuration. Instead with the following job, a user can know the status of all the configuration keys that is being used in the system.
//Configuration key names and their enable state. static void ConfigurationKey(Args _args) { ConfigurationKeySet configKeySet; DictConfigurationKey dictConfigKey; Object formRun ; Map mapConfigKey; str strOutput; int i; ;
mapConfigKey = new Map(Types::Integer, Types::String); configKeySet = new ConfigurationKeySet(); configKeySet.loadSystemSetup();
for (i=1; i <= configKeySet.cnt(); i++) { dictConfigKey = new DictConfigurationKey(configKeySet.cnt2Id(i)); strOutput = dictConfigKey.enabled() ? "enabled:" : "disabled:"; strOutput += " " + " " + dictConfigKey.name(); mapConfigKey.insert(i, stroutput); }
_args = new Args(formstr(SysPick)); _args.parmObject(mapConfigKey);
formRun = classfactory.formRunClass(_args); formRun.init(); formRun.run();
formRun.setCaption('ConfigurationKey Status'); formRun.wait(); }
On executing this job, the output will be displayed in a SysPick form June 15 Validating TabPage Fields DynamicallyThis article is to my lovable sweetheart AnithaSantosh. I would like to share a small piece of information on validation stuff at form level. The requirement is something like doing basic validation. All fields at the form level needs to be filled in; else it needs to update the user that the specific fields’ information is missing. All the field validation is basically done at the table validate Field method. If the form design is changed time to time then the code also needs to be updated which isn’t a good practice. I took a small example to showcase how we can achieve the requirement. I have custTable form which maintains customer details and payment is important information which is required when we make any sales order. If the basic payment information is not filled in while creating customer details then system has to update the user that all details under payment tab needs to mandatorily filled in. 1) Set Auto declaration to ‘Yes’ for payment Tab under custTable form design
2) Under validateWrite of the custTable datasource add the following logic. for (i=1; i<= payment.controlCount (); i++) { if (payment.controlNum (i).valueStr () == '') { warning (strfmt ("%1, %2, %3", i, strdel (payment.controlNum (i).name (), 0, 8), 'Mandatory to be filled in.')); } } So basically before the Cust details are saved it checks whether all fields under payment Tab is filled else it will throw warning will the furnished details.
Note: No. indicates fieldNum This is just a basic information which i felt would be useful tip May 25 Inside Microsoft Dynamics AX 2009 - Released
A big Thanks to MFP and Arjit for their contribution on the release of latest edition on "Inside Microsoft Dynamics AX 2009". To Download Code Samples: http://www.microsoft.com/learning/en/us/book.aspx?ID=13345&locale=en-us#tab2 Happy DAx Learning................................. May 22 SalesTaxGroup Defaulting Issue in AIF 2009I have seen a strange behaviour in AX 2009. While processing vendor records via AIF the corresponding sales tax group doesn't default in the vendor master. VendGroup master table has default tax group setup done as shown When “Vend Group” is passed via Xml accordingly the related fields needs to get defaulted. Screenshot on the same is shown.
Reason: There is no defaulting logic implemented in the setTaxGroup () method in the AxVendTable class. Solution: The setTaxGroup () method needs to implemented with the following logic after isMethodExecuted called. The setTaxGroup () method needs to implemented with the following logic after isMethodExecuted called. //Checks if VendGroup is provided in Xml. //If no VendGroup then it throws error stating mandatory field missing. this.setVendGroupFields ();
//Checks if <VendGroup> field is set in the Xml //And check if the vendor group master has TaxGroupId defined for it. If (this.isFieldSet (fieldnum (VendTable, VendGroup)) && this.vendGroupRecord ().TaxGroupId) { this.parmTaxGroup (this.vendGroupRecord ().TaxGroupId); }
With the following piece of code the sales tax group will be defaulted in the vendor master details. Even Customer master has similar issue and i assume Microsoft would either release a hot fix for AX2009/resolve the bug in vNext May 18 Editor Scripts - New AddinsI have developed few interesting add-ins for Dynamics AX as a part of my project requirement. This tool would be useful especially for AX Developers. The tool is basically an extension in the Editor scripts class. ShowSysFuntions: It is used to show details of sysFunction in Microsoft Dynamics AX. In order to know significance of a particular function the developer needs to traverse through SysDocumentation\Functions each time. Functions help is displayed in a help browser just like the in-built functions in Dynamics AX.
SysFunction Sneak Peak Video:
The second Editor Script is using the SysDictClass methods a) Extend b) Extended By
The project can be
Happy AX Scripting
May 12 Microsoft Dynamics AX 2009 Enterprise Portal DeploymentThanks to Mey for providing an opportunity to join an administrator oriented Deployment and Setup discussion on Enterprise Portal for Microsoft Dynamics AX 2009.
In his own words
"This session provides deep insight into the EP deployment process, what goes behind the scene for EP Setup program and some key "how-to" points on deploying and setting up EP, understanding the infrastructure, etc." Screencast is posted on
Webinar: http://channel9.msdn.com/posts/meysun/Microsoft-Dynamics-AX-2009-Enterprise-Portal-Deployment/
Presentation[PPT]: http://blogs.msdn.com/solutions/attachment/9584167.ashx
|
|
|