axapta

filter look up in dialog

怎甘沉沦 提交于 2019-12-23 04:47:46
问题 I Have created a dialog in a class, the dialog method is as below static void dialog(Args _args) { Dialog dialog; DialogField dialogFieldCurrentState; DialogField dialogFieldNewState; CustInvoiceTable custInvoiceTable; ; custInvoiceTable = _args.record(); dialog = new Dialog("Change State"); dialogFieldCurrentState = dialog.addField(TypeID(State_LT),"Current State: "); dialogFieldCurrentState.value(custInvoiceTable.State); dialogFieldCurrentState.enabled(false); dialogFieldNewState = dialog

Merge several different dynamics AX reports in one

荒凉一梦 提交于 2019-12-23 03:33:22
问题 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 回答1: It can't be done. Not in AX at least. But you could generate PDF then

How to get a Common object from a table id?

感情迁移 提交于 2019-12-23 02:52:27
问题 How to instantiate a common type object (the table's base class in AX) via a TableId ? Furthermore what else can we do with TableId? My goal is to send tableid to my method and there, I will make the buffer of the table the id belongs to. Is it possible? 回答1: It can be done like this: public static Common makeRecord(TableId _tableId) { return new DictTable(_tableId).makeRecord(); } 回答2: Yes you can do this. Here is a webpage explaining: http://www.doens.be/2009/07/select-a-record-from-a-table

Change the background color of a column in a grid

我只是一个虾纸丫 提交于 2019-12-22 08:46:08
问题 I have following form and I want to change the background color of a column, based on the values of other columns; In the orange columns, instead of displaying orange background, I want the cell color to be the RGB combo of Red, Green & Blue fields under COLOR ATTRIBUTES section. 回答1: Let's say that the control the background of which you need to change is named FirstFieldControl. Set its AutoDeclaration property to Yes and BackgroundColor to Window background . Now you need to override the

Display Methods - Multiple Form Data Sources

微笑、不失礼 提交于 2019-12-22 08:27:02
问题 This may seem a simple question, but for some reason I am vexed. I have a form with 3 datasources - InventTable , InventSum , InventDim . So, for example, my grid shows; Item, Name, Site, Warehouse, Physical Stock I have placed a display method on InventDim form DataSource, but I need access to the ItemId from either inventTrans or InventSum . (Obviously looking for the "current" itemId). All I can access is the inventDim which is passed as a parameter _inventDim , as standard. What is the

Reading a comma separated values (csv) file in dynamics ax

扶醉桌前 提交于 2019-12-22 05:17:11
问题 How do you open and parse a csv file in dynamics ax? 回答1: static void TestCommaTextIO(Args _args) { #File CommaTextIo commaTextIo; FileIOPermission permission; container containFromRead; int x; int cols; ; permission = new FileIOPermission('c:\\junk\\mycsv.csv',#io_read); permission.assert(); commaTextIo = new CommaTextIO('c:\\junk\\mycsv.csv','R'); containFromRead = commaTextIo.read(); While(containFromRead) { cols = conLen(containFromRead); for(x=1;x<=cols;x++) { print conpeek

CRUD operation in AX tables using C#

对着背影说爱祢 提交于 2019-12-21 23:33:52
问题 I am new in AX. My boss gave me to task to access tables of AX 2012 from C#. Following are the criteria: Code should be generic. (user will give me table name, column name and any condition if there, to execute insert, delete, update or select queries). Client and server may be or may not be in same Client and server may be or may not be in same domain Without any installation on client machine I tried Business connector. But, we can't use business connector outside the domain and it requires

Code crashes at iteration 86

蓝咒 提交于 2019-12-20 03:12:08
问题 static void Job47(Args _args) { str path,stx; TreeNodeIterator iter; TreeNode treeNode, treeNodeToRelease; Map dictMenuDisplay; FormName formName; MenuItemName menuItemName; container conMenu; int i,n; ; for (n=1;n<=100;n++) { info(strfmt("iter:%1",n)); path ="Menu Items\\Display"; dictMenuDisplay = new Map(Types::String,Types::Container); treenode = Treenode::findNode(path); iter = treenode.AOTiterator(); treenode = iter.next(); while (treenode) { formName = treenode.AOTgetProperty("Object")

Use methods in where statements

半腔热情 提交于 2019-12-20 02:56:25
问题 Table table; select * from table where this.id != table.id && this.foo(table); I am trying to make a selection from a table in X++ code. The table is compared against a record from the table ( this ). A record shall be added to the selection if the id of the record and another record from the table do not equal and several other conditions in foo() evaluate to true. The plan is to make this.foo(table) evaluate the record together with each other record in the table. When I insert the code

Can't catch exception inside AIF service

我与影子孤独终老i 提交于 2019-12-19 04:17:10
问题 I have created an AIF service in dynamics AX 2012, when I tested it by calling the entrypoint method from a job, it worked fine, but when it is deployed en the calls are comming from the soap UI, it crashes inside with an error: "Unhandled esception". While debugging I found out the unhandled exception is thrown inside my catch clause of my try catch statement. It gets inside the catch because the method I am calling inside the try clause thows an error. So does anyone know why I can catch