dynamics-ax-2012-r2

Ax Trace Parser Doesnt Show SQL Queries

女生的网名这么多〃 提交于 2019-12-12 03:22:57
问题 Configuring the tracing cockpit to show sql events, traceparser doesn't show the sql tab, how can I get the sql queries from trace parser? And one second question, It also shows only my queries,is there a way to make it show all queries running in ax? 回答1: See how to Install the Trace Parser. Also ensure you run it from the AOS server and that the correct event selection is provided. Also start AX with escalated privileges (Run as administrator). 来源: https://stackoverflow.com/questions

Select Statement Vs Find in Ax

爷,独闯天下 提交于 2019-12-11 02:38:48
问题 while writing code we can either use select statement or select field list or find method on table for fetching the records. I wonder which of the statement helps in better performance 回答1: It really depends on what you actually need. find() methods must return the whole table buffer, that means, all of the columns are projected into the buffer returned by it, so you have the complete record selected. But sometimes you only need a single column, or just a few. In such cases it can be a waste

Passing Financial Dimension combination values in ax 2012

无人久伴 提交于 2019-12-11 02:29:03
问题 I need to pass Ledger Dimension value for General Journal (Table:LedgerJournalTable) form to LedgerJournalTransDaily(Table:LedgerJournalTrns) form along with combination values. EX: In General Journal form I am creating a new journal with the journal name "Alloc"(ledger dimension is like 1003), and in Financial dimension tab I am selecting Cost centre(024), department(001), purpose(training) after that I am clicking on lines, then a new form LedgerJournalTransDaily. In the from grid one filed

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.

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

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]

How do you find a user's last used printer in SysLastValue

戏子无情 提交于 2019-12-04 18:20:00
I've been trying to find where a user's last used printer is stored so that I can clear this usage data (as a few users have an issue where the remembered printer keeps defaulting to the XPS writer, despite us having KB981681 installed & the printer being available; just not defaulted on certain AX forms). I know this data's somewhere in the Usage Data, which I can browse via AX: Microsoft Dynamics AX > Tools > Development Tools > Application Objects > Usage Data AOT > System Documentation > Tables > SysLastValue > (right click) > Add-Ins > Table Browser Or through SQL: use AXDB go select *

Table Update Event Handler

给你一囗甜甜゛ 提交于 2019-12-04 07:48:46
I am investigating the capabilities of the new delegate & event subscription pattern in AX 2012. At the moment I am looking to detect when a particular field has been modified, for example when SalesTable.SalesStatus is changed to SalesStatus::Invoiced . I have created the following post-event handler and attatched to the SalesTable.Update method; public static void SalesTable_UpdatePosteventHandler(XppPrePostArgs _args) { Info("Sales Update Event Handler"); } Now I know I can get the SalesTable from the _args , but how can I detect a field has changed? I could really use a before & after

Update records that can be retrieved by multiple joins in x++

大兔子大兔子 提交于 2019-12-02 08:53:10
So I have a complete x++ script that aims to update records based on the retrieved result set made with select query with multiple joins and using crosscompany As I have been told, it is not a good idea to update records when there is crosscompany. Can you give expert advice on how to do it the best practice way considering my current script. here is the script static void UpdateSample(Args _args) { InventTable a; InventTableModule b; EcoResProduct c; EcoResProductCategory d; EcoResCategory e; EcoResCategoryHierarchy f; int i = 0; while select crossCompany a exists join b where a.ItemId == b