| Santosh.'s profileDynamics AxPhotosBlogLists | Help |
|
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. |
|
|