x++

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!

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:

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

dynamics ax : Push Customized form to All users

荒凉一梦 提交于 2019-12-08 03:26:01
问题 Recently, I was troubleshooting an issue related to user settings. There was a requirement to migrate the user settings from one environment to another. There is an AX 2009 form which users make their own personalisations to, moving some of the fields around, or perhaps adding other fields (via the right click->setup functions) , so that unnecessary fields are hidden. I have saved that form , so that it is available for me , but when i migrate the form to another environment i notice that the

How to mimic the AOT Export by layer functionality X++?

﹥>﹥吖頭↗ 提交于 2019-12-07 23:23:37
问题 I am attempting to programmatically duplicate the following steps in X++ In the AOT Tree right click on the root node and click "Export" Provide a file name Click the "Application object layer" checkbox Specify "cus" as the Application object layer Export the XPO to the file I've gotten as far as bring able to export entire AOT tree but I can't figure out a way to narrow it down to just the cus layer. Here is my current code sample ... TreeNode treeNode; FileIoPermission perm; #define

Merge several different dynamics AX reports in one

五迷三道 提交于 2019-12-07 09:51:35
I'm investigating if it is possible to send three different Ax 2009 reports to only one output. We already have an example of merging multiple invoices using the SalesInvoice report into one output , but this is not what we want. The output would need to be generated by X++ and would contain for example: SalesInvoice SalesPurchInvoice_RU AKT_RU Any pointers? An ' It can't be done. ' is an acceptable answer! Thanks It can't be done. Not in AX at least. But you could generate PDF then combine them using an external program or interface AX with a .Net library . Update: Take a look on how to merge

How to create an X++ batch job in Axapta 3.0?

你说的曾经没有我的故事 提交于 2019-12-07 09:14:31
问题 I'd like to create a batch job in X++ for Microsoft Axapta 3.0 (Dynamics AX). How can I create a job which executes an X++ function like this one? static void ExternalDataRead(Args _args) { ... } 回答1: Here's the bare minimum needed to create a batch job in AX: Create a batch job by creating a new class that extends the RunBaseBatch class: class MyBatchJob extends RunBaseBatch { } Implement the abstract method pack() : public container pack() { return connull(); } Implement the abstract method

X++ passing current selected records in a form for your report

柔情痞子 提交于 2019-12-07 05:47:44
问题 I am trying to make this question sound as clear as possible. Basically, I have created a report, and it now exists as a menuitem button so that the report can run off the form. What I would like to do, is be able to multi-select records, then when I click on my button to run my report, the current selected records are passed into the dialog form (filter screen) that appears. I have tried to do this using the same methods as with the SaleLinesEdit form, but had no success. If anyone could

How to change the level of AX info messages

非 Y 不嫁゛ 提交于 2019-12-06 22:32:36
问题 In Dynamics AX 2009 I am trying to determine the level of indentation of an info message. What I want is something similar to this: Prefix Info1 Info2 Prefix2 Info3 I found this: http://www.doens.be/2010/05/the-ax-infolog/ But don't want to use a loop, so I thought something like this might work: setprefix("Prefix"); { info("Info1"); info("Info2"); } setprefix("Prefix2"); { info("Info3"); } But it doesn't. Is there a way to do this in x++, and what are the rules as to what indent level is