How to Set default field value in AX

 public void initValue() // use intivalue method of table

{


super();


// setting current date time 

yourTable.currentDate = this.Now(); // this method will work only in AX.


//setting any default value

yourTable.YourField = "Default value";


}

Comments

Popular posts from this blog

How to Create a wizard in x++ d365

how to post trade agreement journals automatically using x++ code

X++ code to CREATE AND POST A TRADE AGREEMENT IN MICROSOFT DYNAMICS 365 in D365 F & O