dynamics-ax-2012

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

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

How to post document date and document number in general journal

别来无恙 提交于 2019-12-13 06:57:50
问题 i'm wondering if anyone can help me figure out how to programatically set the document number and date in the general journal trans, under the tab invoice. I'm trying to post to the general journal in ax 2012 with x++. I currently have this code that works but there is no method under the ledgerjournal trans to set the document no or date. infact alot of the setters are missing and only has linenum account type, journal num etc etc. How can i set these fields? below i have some code static

Dynamics AX 2012 RegConfig does not work

╄→尐↘猪︶ㄣ 提交于 2019-12-13 01:34:37
问题 I'm currently developping a failover service for an environment using Dynamics AX and 2 mirrored SQL servers, and I have some issues getting AX to work the way I expect it to. I have developped a service which does the following : - try to connect to the SQL servers instances - start Dynamics AX using the reachable SQL server. To do this, I have created 2 AX configuration files (.axc), each one pointing to a SQL server. But when I try to start the service, no mater which way I use, AX always

How to use RecId as a foreign key in a form

醉酒当歌 提交于 2019-12-12 16:26:08
问题 I have a table of items that each reference one other item in another table. We'll say the items are people, and the related items are favorite foods. Table A: Bob:1, Sally:1, Sue:3 Table B: 1:Apples, 2:Bananas, 3:Oranges The "people" are tied to their favorite "foods" by the food RecId, refererenced in the People table. I have a form/grid for editing people. Is there a way to cause the FoodRecId StringView in the grid to convert its value so the RecId numbers are not visible in the grid? I

Add custom text to AX 2012 drill-down links

為{幸葍}努か 提交于 2019-12-12 05:02:22
问题 I want to customize the standard drill-down functionality and add a text parameter to the drill-down URL. I will then parse and use the parameter in the SysStartUpCmdDrillDown or EventDrillDownPoller class like the solution provided by Jan B. Kjeldsen in this question. The standard drill-down link is dynamics:// Target /?DrillDown_ RecID / : dynamics://0/?DrillDown_5637230378/ In previous versions of AX it was possible to modify the RecId to custom text and parse the text once the client is

Ax 2012 aif catching warnings

ε祈祈猫儿з 提交于 2019-12-12 04:33:56
问题 I created an AIF web service in ax. I have a vb.net application that calls the aif web service to insert data into the general journal. Now when an error occurs i catch it in vb and it returns the error which is fine. What i want to do is also catch the warning messages. Usually what happens , is if a line is getting entered and its a wrong dimension, it returns a warning message and an error. but i only get the error. So the question is how can i either catch and retrieve the warning message

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

Dynamics AX 2012 - CommandButton insert and edit by form

萝らか妹 提交于 2019-12-12 03:01:03
问题 I've created form that should insert, edit and delete row by usig CommandButtons. Propierity is set in Command field to New, Edit record and delete. Generally it works, but its not safe, because it is editing rows without using CommandButton. I don't know how to make data Source or CommandButton propierities to edit record only with button, not automatically. 回答1: This is how standard AX 2012 forms behave, if created using form templates as described here. To create a form with a template,