axapta

Advanced query range

久未见 提交于 2019-12-08 21:59:37
问题 How to make a query in Ax with advanced filtering (with x++): I want to make such filter criteria On SalesTable form to show SalesTable.SalesId == "001" || SalesLine.LineAmount == 100 . So result should show SalesOrder 001 AND other salesOrders which has at least one SalesLine with LineAmount = 100? 回答1: The AX select statement supports exists join such as: while select salesTable exits join salesLine where salesLine.SalesId == salesTable.SalesId && salesLine.LineAmount == 100 X++ does not

Custom Lookup and Group By

余生长醉 提交于 2019-12-08 19:39:53
问题 TLDR: Why group by clauses are disabled in lookups when the field using the lookup is not empty? I want to do a custom lookup on a field in a form. The table CTable looks like this: Val Spec ------------ A alpha A beta A gamma B delta C epsilon The look up only concerns the Val column which is defined using an EDT with a basic relationship on it: Val == CTable.Val The lookup obviously gives me a list like this: A A A B C Let's to a group by to get rid of all the duplicated As, I thought!

Specific Dimension on VendOpenTrans Grid

冷暖自知 提交于 2019-12-08 18:12:31
My task is to add a field in VendOpenTrans with a specific Dimension. I have added to my DataSources in VendOpenTrans tables DimensionAttributeValueSet, DimensionAttributeValueSetItem, DimensionAttributeValue and DimensionAttribute. In their properties I have made joins (join source) with InnerJoin LinkType (I tried all of the options here). Then I have add a field on my grid from DimensionAttributeValueSetItem -> DisplayValue (field name). And now in ExecuteQuery method of VendOpenTrans I add a code: public void executeQuery() { /*QueryBuildRange dimensionAttributeValueSetRange; ;

How can you create a simple dialog box in Dynamics AX?

不问归期 提交于 2019-12-08 15:43:08
问题 How can you create a simple dialog box in Dynamics ax? 回答1: static void DialogSampleCode(Args _args) { Dialog dialog; DialogField field; ; dialog = new Dialog("My Dialog"); dialog.addText("Select your favorite customer:"); field = dialog.addField(typeid(CustAccount)); dialog.run(); if (dialog.closedOk()) { info(field.value()); } } 回答2: for really simple dialog boxes, use the Box Class: Box::info("your message"); or Box::warning("your message"); or if (Box::okCancel("continue?", DialogButton:

Updating a salesorder using AIF

只愿长相守 提交于 2019-12-08 13:12:57
问题 I'm running my head against the wall here trying to update a salesorder in C# through AIF (Dynamics AX webservices) I have the following code: /// <summary> /// Updates an order in AX /// </summary> /// <param name="order">Order to update</param> public void UpdateOrder(SalesOrder order) { try { var client = new write.SalesOrderServiceClient(); var callContext = new write.CallContext() { Company = "mcompany" }; var entityKeyList = new write.EntityKey[1]; var entityKey = new write.EntityKey();

Fetching data from dynamics ax 2009 using Ax webservices and C#

纵饮孤独 提交于 2019-12-08 08:36:27
I am trying to fetch the list of vendors from the AX database. I want to show a list of vendors in my aspx page.How can i achieve this? here is what i have done so far 1-Deployed the Ax webservices. 2-Created a client class to call the service. i am stuck here and not sure how to fetch the data. Please advice. I found out how to do it..here is the solution as to how to Consume AIF webservices.here is the code.Please refer the following article http://msdn.microsoft.com/en-us/library/cc652581.aspx customerService.CustomerServiceClient sc = new ConsumingAxWebService.customerService

Fetching data from dynamics ax 2009 using Ax webservices and C#

烈酒焚心 提交于 2019-12-08 06:36:15
问题 I am trying to fetch the list of vendors from the AX database. I want to show a list of vendors in my aspx page.How can i achieve this? here is what i have done so far 1-Deployed the Ax webservices. 2-Created a client class to call the service. i am stuck here and not sure how to fetch the data. Please advice. 回答1: I found out how to do it..here is the solution as to how to Consume AIF webservices.here is the code.Please refer the following article http://msdn.microsoft.com/en-us/library

Specific Dimension on VendOpenTrans Grid

流过昼夜 提交于 2019-12-08 05:57:55
问题 My task is to add a field in VendOpenTrans with a specific Dimension. I have added to my DataSources in VendOpenTrans tables DimensionAttributeValueSet, DimensionAttributeValueSetItem, DimensionAttributeValue and DimensionAttribute. In their properties I have made joins (join source) with InnerJoin LinkType (I tried all of the options here). Then I have add a field on my grid from DimensionAttributeValueSetItem -> DisplayValue (field name). And now in ExecuteQuery method of VendOpenTrans I

ODBC connection to external data

折月煮酒 提交于 2019-12-08 05:45:41
问题 Is there any way to get an ODBC-Connection to an ( external ) table from AX2012R2, without using a DSN in the ODBC-connections? It worked fine in 2009 with something like systemInfo = SysSQLSystemInfo::construct(); loginProperty = new LoginProperty(); loginProperty.setServer(systemInfo.getLoginServer()); loginProperty.setDatabase(systemInfo.getloginDatabase()); conString = strFmt( 'Driver={SQL Server Native Client 10.0};' + 'Server=%1;' + 'Database=%2;' , systemInfo.getLoginServer() ,

What are the possible values and text description for batch job status in AX 2012?

依然范特西╮ 提交于 2019-12-08 05:36:07
问题 I'm creating a report to show issues with batch jobs in Microsoft AX 2012, but have been unable to find anything to link the integer status values in the BATCHJOB table in SQL Server to the text description shown in the application. I was told this should exist in the model database in the enums, but I was unable to determine the proper links between the data in that database. I have also been unable to find this information in a web search or any of the documentation provided by Microsoft.