web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Make field non editable based on another field in LedgerPeriodCloseProjectTaskListPage form

(1) ShareShare
ReportReport
Posted on by 170
Hi all,
 
Thanks in advance!!!

I have a requirement where I want to make a field for a particular record non editable based on another field value. The form name is LedgerPeriodCloseProjectTaskListPage
and the data source used is  LedgerPeriodCloseProjectTask. But the catch is the combo box (Tick mark) control which I want to make editable/noneditable is not having a field at table level and the data filled in it is based on the form data source method of the same table; The name of the control is 'IsComplete'. And field on which the editable/noneditable property of the 'IsComplete' control should be dependent is my custom field of BaseEnum type where if the element value of the Enum is 'Submitted' then only the 'IsComplete' should be non editable or else editable!
 
//////////
 
This is the form where the Completed tick value for a particular record should be non editable if the Workflow status value for the same record is Approved!


Thanks in advance!!!


 
  • Verified answer
    Martin Dráb Profile Picture
    241,501 Most Valuable Professional on at
    Do you have any particular problem or are you saying that you don't know anything - how to use enums, how to access a field value, how to make a control read-only and so on?
     
    Before you explain your actual problem, let me give you a few hints:
    • Call your code from active() method of the data source (create a CoC extension of the data source) or from a more specific method called from active() (it depends on the form implementation).
    • Get the control you're interested in by name: element.IsComplete.
    • Use its allowEdit() method to make it editable or non-editable.
    • Your condition will be something like ledgerPeriodCloseProjectTask.MyField == MyEnum::Approved.
    (Moved from Dynamics AX forum.)

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 532 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 351 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 195

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans