RE - Field Mandatory

Hi Everyone,

I have a customized form… In that there are some tabs…

Now i need to make one field mandatory in tat form which is having separate DataSource.

I tried , but it is throwing error only when i click that particular tab.

Help me to solve this.

Regards,

Madhan

If it is specific to a form, you can place your logic in validateWrite() method

Hi Kranthi,

It is not specific… Its Dimension field…

please elaborate. Mention the version of AX well

Hi Kranthi,

Its AX 2009,

In a form there are 3 tabs…

Al those tabs are having diff Data Sources. In that last tab there are dimension fields available. I need to make mandatory from one of those dimensions.

I tried validate write and through properties also to make mandatory.

But if i were in the First tab the sys is not throwing any error for mandatory.

It is throwing only when click the last tab alone .

Help me in this.

Regards,

Madhan

You need to place your code in main data source validate write,

something like this, the below is for financial dimension

if (table.Dimension[1] == ‘’)// 1 for department

{

ret = checkFailed(‘The department has to filled’);//use a label instead

}