Notifications
Announcements
No record found.
I have a condition where a field named Group should not be editable when I have a value in a boolean filed as TrueRegards,C4u
Hello C4u,
Check this.
https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/296087/enable-disable-fields-in-a-form
I didn't quite get that properly, if possible can you explain me with a piece of code ?
Hi C4u,
Please, can you show us the field you want to make uneditable and the boolean field(screenshots)
The answer is there in the link posted by Komi. And there are hundreds of examples in the standard code by the way.
Hi, You need to set Auto Declaration property to Yes on 'Group' control and override Modified method of this control in form design.
public boolean modified() { boolean ret; ret = super(); GroupField.allowEdit(!this.value()); return ret; }
Override active method of form datasource and add the below code.
public int active() { int ret; ret = super(); GroupField.allowEdit(!DataSourceName.BooleanField); return ret; }
The field I have mentioned is a string field that has been created virtually in a form and it's been linked to a data method. Now, I have to change this one, based on a check box condition without any other method. Is there anyway I can use the method that is linked to the virtual field ?
I think still the code shared above is applicable for unbound string control (Group field). Please try it.
But in the code that you have given involves usage of separate methods like active, modified. I am asking for a way to use the existing method associated with the virtual string
I don't think allow edit can be controlled from within that method. Is there any reason you want to use method of virtual string (unbound control) for allow edit.
From the edit method only, I have to control where the sequence number can be edited or not. Since the field is virtual string field, I cant able to override active or modified from its group control in form
In this image, consider this as a QO and I have a condition here, I have to the make the sequence number field as not editable when I have a tick mark in the field of test result and it should be editable when the test result has the value cross.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 565 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader