axapta

ODBC connection to external data

不问归期 提交于 2019-12-08 05:26:27
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() , systemInfo.getloginDatabase() ); if ( <someFunctionToCheckForTrusedConnectin> ) { conString += '"Trusted

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

dynamics ax : Push Customized form to All users

空扰寡人 提交于 2019-12-06 19:31:31
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 new user don't have any change on the form. As we all know, User related setups for queries, forms,

How to get a Common object from a table id?

送分小仙女□ 提交于 2019-12-06 15:55:56
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? It can be done like this: public static Common makeRecord(TableId _tableId) { return new DictTable(_tableId).makeRecord(); } maqk Yes you can do this. Here is a webpage explaining: http://www.doens.be/2009/07/select-a-record-from-a-table-when-you-only-have-the-tableid/ 来源: https://stackoverflow.com/questions/10095415/how-to-get-a-common-object

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

╄→尐↘猪︶ㄣ 提交于 2019-12-06 15:35:54
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. Is anyone able to supply these values, or tell me where to find them? SELECT bj.[STATUS] AS [bj_STATUS]