Create Customer Sales Order Templates With Item Lists

Dynamics AX Tip Of The Day

Dynamics AX 2012 R3 is chock full of useful features, but sometimes they are a little reclusive, and you have to know where to find them. An example of this is the Customer Item Lists function that allows you to create item lists based on customer sales history and then use them as order templates to save time during the order entry process.

This trick will keep the customers think that you are a mind reader.

View original post 304 more words

Leave a comment

Posted by on October 4, 2016 in Uncategorized


The Reserved ordered items inventory parameter


So I must admit I’m a bit conflicted about the best way to set this parameter. I like to leave it off, but other consultants I’ve worked with think that it should be on.

Inventory management > Setup > Inventory management parameters > General:

So what does it do? Well it lets you reserve from open supply orders as well as physical inventory. By supply orders I mean purchase orders, production orders, or transfer orders.

So the first thing you might notice is the on-hand display. With the parameter selected I see:

But with it off, the system shows:

Let’s leave ‘Reserved ordered items’ blank, and create a sales order for 20. If I have Automatic reservation enabled, when I create the sales order I’ll see:

Fair enough. I’m ordering 20 and there are only 11 in the warehouse, so the system’s asking me what I’d like to do.


View original post 267 more words

Leave a comment

Posted by on September 30, 2016 in Uncategorized


How to enable document handling button in dynamics AX 2012 form footer/status bar

Today i will demonstrate about how to enable document handling button in ax 2012 form.


Let take an example of form Route Operations  where document handling button is not enabled.


The document handling button on status bar works on three parameters which should be true for every form in AX to have the document handling button.There are 2 steps must be done on form design to bring the document handling button on Route Operations form.

1.Go to design section on form and change the style property to Auto from SimpleList.

2.Set the StatusBarStyle property to Auto from Simple.

The third parameter is user specific,one should enable the document handling checkbox on option form(Tools->Options->Status Bar).


Now You are ready to go.


Important Note From MSDN:


Happy Daxing🙂


Tags: , , , , ,

Map, set, etc., should not be passed as parameter to a static method

My Dynamics Space

LCS BP error: Map, set, etc., should not be passed as parameter to a static method

Developer normally used Map or Set to pass as argument to the static method. Which is not recommended by LCS.


Here is the way to convert the SET or MAP to container to fix this BP warnings.

Convert SET to Container and vice versa:

In this example I have taken Worktable as example for demonstrating.

Container                   set2Con;

SetEnumerator          se;

whsworktable            worktable;

Set                            container2Set; //SET Class

Set                            setWorkHeaders = new Set (Types::Record);

//Add the marked records of worktable using for…Loop into set.


//Pack the set value into container

set2Con = setWorkHeaders.pack();

Pass this container as argument to the static method. In Static method using the Set

class, convert the CONTAINER into SET again.

container2Set = Set::create (set2Con);

Using SET enumerator, read the value from set

se = container2Set.getEnumerator();

while (se.moveNext())


workTable =…

View original post 111 more words

Leave a comment

Posted by on September 29, 2016 in Uncategorized


How to select multiple records from lookup-Part-1(SysLookupMultiSelectCtrl)

Today i would share how to create a lookup to select multiple items in Dynamics AX 2012 forms.

In normal lookup methods we can only select one item at a time but in AX 2012 has introduced new class SysLookupMultiSelectCtrl to achieve the same without any hassle.

There are multiple ways to achieve the same but today i will demonstrate how can we have a site lookup with provision to select more then one item selection on parameter form in dynamics ax.

Multiselect lookup.png


  1. Create a Query named InventSiteQR that will contains data source e. InventSiteas shown in the below figure.

QueryMultiple lookup.PNG

2.Create the control on the form, set the auto declaration property to yes

Multiselect lookup

3.Declare instance of class SysLookupMultiSelectCtrl In the Class Declaration of the form:

public final class FormRun extends ObjectRun
 SysLookupMultiSelectCtrl msCtrlSite;


4.Write below code in the Init method of the form:

public void init()
 msCtrlSite = SysLookupMultiSelectCtrl::construct(element, SplitCostingProd, 
querystr(InventSiteQR),false, [tableNum(InventSite), fieldNum(InventSite, SiteId)]);

5.Add new field container type on parameter table named InventSiteCon

6.Write below code on the active method of form parameter table data source to update the control on load of the form:

public int active()

7.Write below code on the modified method of form control to get the selected record values from lookup and update those values to parameter Table:

public boolean modified()
 boolean ret;
 container conSite;
 RefRecId recid;
 int i;
 InventSite inventSite;
 container roleIds, roleNames;

 ret = super();
 conSite = msCtrlSite.get();
 for(i = 1;i<=conLen(conSite);i ++)
 recid = conPeek(conSite,i);
 select firstOnly inventSite where inventSite.RecId == recid;
 roleIds += inventSite.RecId;
 roleNames += inventSite.SiteId;
 ProdParameters.InventSiteCon = [roleIds,roleNames];
 return ret;


Thats it. Happy Daxing🙂


Tags: , , , , , ,

Disable Form grid column automatic sorting feature

I have been asked by customer to enable sorting only on one field and one should not be able to sort by using other grid fields/controls.

in simple words he wants me to disable automatic sorting feature on other fields on grid except one so that when the user clicks the column header, the order displayed would not change.

i found dynamics community conversation to achieve this quick manner.I have added an override method sort() on each grid control where i wants to disable automatic sorting and also blocked super.

sort method


public int sort(SortOrder _sortDirection)
 int ret;

 //ret = super(_sortDirection);

 return ret;


Happy Daxing🙂

References :
How can I disable the automatic sort on the grid?
Preventing users from sorting a grid


Tags: , , , , ,

Fill color in Grid records based on condition flag in AX

My client requirement was to change the grid row’s color in dynamics ax 2012 on the condition basis.

There is a method displayOption() method on a form data source which can be useful to highlight particular rows on grid, based on the data in the record. displayOption() method will execute once for each record before the record is displayed on the form.

public void displayOption(Common _record, FormRowDisplayOption _options)
 #define.DeepSkyBlue(0, 191, 255)

 if (_record.(fieldnum(ProdTable,ProdStatus))==ProdStatus::ReportedFinished)

 super(_record, _options);

Happy Daxing🙂

Reference :
Highlighting record in Grid

How to change grid row color in listpage form in Dynamics Ax 2012


Tags: , , , , , , , ,