How to make field mandatory, after which on click OK message must be displayed if field left blank

In product information management>released products> on creating new product , I want to make fields item group model, item group mandatory.

I tried making that field mandatory in properties but nothing happens product gets added in form.

I am new to AX please help me.

Hi Amit,

Please find below screen shot, you need to enable the mandatory field YES

Once you done yes save and compile the form. If user not entered the item group it allow to save the record.

Regards,

Mohammed

ma@asiatechsoft.com

I don’t want record to get saved. it should give message for field to filled in. I done it mandatory but nothing happens.

I cant see image mohammed.

regards,

amit

I don’t know why image is not display, I can help you by team viewer, if you need. It won’t allow user to skip item group field, its mandatory and it pop message appear that, item group required.

Mohammed

ma@asiatechsoft.com

I wrote validatewrite method on that field which I want mandatory. but it pop up message only when we go on that field and when I directly click button OK,record gets added to form.

regards,

amit.

If you want the field mandatory in all places in AX, set it as mandatory at table field level. If you want a validation in that one form only, add it to validateWrite() on the data source (see Methods on a Form Data Source if you want to learn about other useful methods).

Thanks guys I got that to do.

Now I am facing another issue. I have 2 fields, when I fill data in one field another field should also get populated with that same value.

Can anyone suggest me.

Thanks and regards,

Amit.

Your question is not related to the thread (“How to make field mandatory…”) which is even already answered, therefore you should create a new thread.

Just very briefly: You can use modifiedField() method on table, for instance.