x++

How can you scan an image with X++

Does anyone know how to scan an image with X++? ...

How to create an X++ batch job in Axapta 3.0?

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) { ... } ...

Page breaks in Dynamic Ax Reports

How do you insert page breaks in Dynamic AX reports? ...

How do I get the previous field value in the modifiedField method of a Dynamic Ax table?

I would like to be able to perform some logic in the table.modifiedField method which compares the previous value of a field to the new value. How do I get to the previous value? ...

MS Dynamics AX / AXAPTA - Where is the code that prevents reprint of payment advices of unposted cheques?

We want to reprint a payment advice, even before it is posted. The report BankPaymAdviceCheque should be able to do this but only prints advices for already posted cheques. The report's dialog, however, allows you to choose unposted ones as well. No matter how I searched in the code, I cannot find the bit that prevents unposted rem...

What is the best way to print columns from different tables on the same row using the Axapta reporting tool?

It seems like each body section in an axapta report can only print columns from a single table(consistantly). For instance: I have a report that has the following tables: SalesLine, InventTable and CustTable. Then I would like to print columns from each of this tables on the same row. It seems like I can do this when placing the field...

How can I add more information to MS Dynamics 2009 AX's alert messages with X++ ?

Does anyone have some sample code or can direct me to which class I can modify to add more information to the alert messages in Dynamics AX (DAX). I want to for instance add a vendor number and userid when a name of a vendor has been changed. EDIT: I have been told by someone that HTML code must be entered in the description panel when ...

Range on integer fields in Axapta/Dynamics Ax

Is there a way, in Axapta/Dynamics Ax, to create an Extended Data Type of type integer which only allows enering values in a specified range (i.e., if the extended data type is meant for storing years, I should be able to set a range like 1900-2100), or do I have to manage the range using X++ code? And if I need to use X++ code to manag...

Freeze one or more grid columns

Is it possible to freeze a grid column in Dynamics Ax so that as the user scrolls to the right the first column or two continues to show and doesn't scroll out of view? ...

Nested notExists joins X++ (Dynamics AX3.0)

When the following code executes: select sum(qty) from inventTrans index hint TransTypeIdx where inventTrans.ItemId == itemId && inventTrans.TransType == InventTransType::Sales && inventTrans.InventDimId == inventDimId notExists join custTable where custTable.AccountN...

How do you reset the workflow status of a purchase requisition from completed to submitted programatically in X++?

MS Dynamics AX 2009: I need to do this from the Purchase Order Screen, so I only have the Purchase Requisition number available from the PurchLines Table. Your help would be really greatly appreciated as there is nothing yet on the net available (that I can find) and there are missing classes in the AX 2009 Tutorials. All helpful answ...

Dynamics AX: How can I open a docuview document attached to a Purchase Requisition from a Purchase Order?

Edit: The objective is to make quote documents that were attached to Purchase Requisitions available to staff that processes the Purchase Orders directly an in an easy way without having to navigate back to the requisition document itself. I would like to use the DocuRef::openDocHandling method from within the Purchase Order screen with...

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...

What does the construct keyword do when added to a method?

The code here is X++. I know very little about it, though I am familiar with C#. MS says its similiar to C++ and C# in syntax. Anyway, I assume the code below is a method. It has "Construct" as a keyword. What is a construct/Constructor method? What does the construct keyword change when applied to the function? Also, am I wrong in ...

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. ...

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. ...

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...

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...

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...