axapta

Injection safe call to IAxaptaRecord.ExecuteStmt()

Is there an injection safe way to call via the axpata business connector string salesId = someObject.Text; IAxaptaRecord salesLine = ax.CreateRecord("SalesLine"); salesLine.ExecuteStmt("select * from %1 where %1.SalesId == '" + salesId + "'"); If someObject.Text is set to the following, i am then vulnerable to x++ code injection: "S...

Dynamics AX: How can corrected tax be coded in the Invoicing Input / Update of Purchase Orders - Posting Function?

Corrected Tax has coding support in the LedgerJournalEngine but this functionality is not available for invoicing update via the Purchase Order Screens. The scenario is as follows: On the invoicing screen of the Purchase Orders I want to add a field for corrected tax per invoice line. Corrected Tax must override the default tax calcu...

Installing Dynamics AX 4.0 SP2 on SQL Server 2008

Is it possible to install AX 4.0 SP2 on SQL Server 2008 and Windows Server 2008 ...

Axapta/DynamicsAx: UTC datetime conversion

We are trying to interpret the data stored in Axapata's TIMEZONESRULESDATA table. Particularly, we'd like to figure out how it stores DST begin/end times. So far, my guess is: TZENUM: foreign key referencing TIMEZONESLIST (time zone name and identifier) YEAR: 0 if rule is valid indefinitely or a year where the timezone rule is in effect...

How can I execute custom code when the AOT Service Starts on the Server in MS Dynamics AX?

I need to switch off certain some batch jobs when DAX has been restarted. How can I accomplish this? Note from Author: This is most likely a X++ programming question and not configurable. ...

Best technology to create web forms and reports on top of a Dynamics AX backend?

Want to create web sites with data on Dynamics AX. We want not to pay for Enterpise Portal or SHarepoint an do our own web app on top of AX. ...

Dynamics ax 4.0, opening form without applying filter on current record.

I have form with VendTable grid for example, which has CustAccount field. I want to place button, click on which will open CustTable form where all customers are visible. If I just put CustTable menuitem, then clicking on it will open CustTable form, but in this form only one record is displayed - one that has the same AccountNum as in...

Axapta: How can the Table Name, Not the Table ID, be used as a select in the Select Dialog of the Database Log Report?

Currently only the Table Id can be used which is meaningless as it is a number. A little bit of code example would really be great. ...

Is it possible to use Windows Authentication to logon to Axapta 4 (or 5) in a Website/webservice

Using this code I can not create a connection using IIS 7 with Windows Authentication. try { Axapta axapta = new Axapta(); axapta.Logon("", "", "", ""); //Or this> axapta.Logon("COMPANY", "NL-nl", "OBJECTSERVER", ""); System.Diagnostics.Debug.WriteLine("yep"); a...

Mark mandatory fields on form, if not filled with valid value

hi there, if you create a new dataset, mandatory fields which are not set yet are marked with a wiggly red line. it seems, that only string-values ( or several fields, but at least no integers ) are marked this way. if integer-references are used ( 1-based ), the regarding fields are filled with 0 per default which causes the red lin...

How to get a list of methods on a table?

In Microsoft Dynamics AX, how do I get a list of methods on a table from C#? ...

Axapta: How to load an image from a file on disk into a grid with a Window Control.

I have been trying: to load an image into a window control with a datamethod that loads the file into a bitmap, returning a bitmap. This makes Axapta Crash. When doing the same but returning an image does not do anything. using the "active" method on the data source has some success if I set the "imagename" to the filename and the auto...

MS Dynamics AX 2009 - how to copy/install a self programmed extension?

So, I've started with programming Microsoft Dynamics AX 2009, created a little own sample app in my dev-System, and now I want to install this on my test-system, which is running on some other comp. My problem: I got no idea how to create an installer, or even how to install my AX extension by hand. No clue at all. So, how would I inst...

Axapta: prevent user from changing form query with search

I've created a custom lookup form in Axapta 3.0 in which a user can select an OprId from a ProdRoute datasource. Before displaying the lookup the ProdId is set and may not be altered by the user. The user may only select an OprId from the ProdRoute of the production order with the valid ProdId. According to documentation, one can prevent...

AX get stuck in a loop when printing a report

Hi, A client is having some trouble printing a standard report in Axapta 3.0 SP3. The report finishes gathering data, and everything is fine. But when the program is trying to print it to screen it starts an endless loop. Down in the bottom left on the status bar it says "Page 1, Section: xxxxx" where xxxxx counts from 1 to 65536 and st...

Axapta: Edit form field values

Using a 'clicked' override on a button, I'd like to modify values in an Axapta form. I'm able to get data from the form field using: str strOld = Form_FieldName.valueStr(); I'm able to prepend text to the field using: Form_FieldName.pasteText(strNew); I can't seem to find a .clear method or .value= method. I'd like to replace...

Axapta: Find table by name in AOT

I would like to query the AOT to see if a table name exists using X++. Can anyone point me in the right direction or provide some sample code for doing that? If table exists with the name (str tableName) provided, return true; else, return false. Thanks ...

Axapta Validation Override Always Executes Twice

In most cases, validation methods I've overridden execute twice each time the parent field is changed. Everything still works, but the InfoLog displays double messages every time. Is there any way to prevent this? Thanks public boolean validate() { boolean ret; int exlowValue; int lowValue; int highValue; int exhi...

Axapta v3.0 with SQL 2005?

I managed to find an old Axapta version to practice some programming and learn Axapta a little. The problem is I can't get it started. I had installed SP1-2-3 and started it, it is supposed to create the database. Well it creates some tables then I get a syntax error from SQL Server. I am told even SP1 was enough for SQL 2005. The error ...

Axapta Dialog Validation

I've found several posts and articles around the net talking about validating form fields in dialogs, but none of the examples I've found seem to work properly. Can someone post a complete, concise example of x++ code that generates a dialog containing a single text field, performs simple validation (if text = "abc") on it, and either c...