DefaultValue ComboBox in Dynamics AX with X++

Beside modify metadata on form properties, as best practice we can use code like below to assign default value for combobox.

  • You can use this code in the form’s init method after super():
ComboBoxName.selection(ComboBoxName::DefaultValue);
  • If this is a table field we should you best practice overriding the initValue method in the table:
this.ComboBoxName = ComboBoxName::DefaultValue;
  • Override initValue in the form’s datasource only if it should be a specific behaviour in this form only.

Max Nguyen

Max Nguyen
MCP - Microsoft Dynamics AX Technical Consultant, currently living and working in Seoul, S.Korea :)

Number sequence farmework overview in Dynamics AX 2012

How to create number sequence in Dynamics AX 2012 with difference scenarios Continue reading

Overview delete action in Dyanmics AX 2012

Published on January 19, 2017

Response in AIF custom service class

Published on January 12, 2017