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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Allow edit field in extension of active method

(4) ShareShare
ReportReport
Posted on by 100
Hello
 
I have a following requirement:
 
 
This field needs to be editable always.
 
As it is now, it is editable only if cust trans is open (like other fields from cust trans datasource as well):
 
What I tried is:
 
 
But this doesn't work.
 
Any ideas?
 
Thanks in advance
Categories:
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,743 Super User 2025 Season 2 on at
    Hi devgirlX,
     
    Have you used the debugger to find out if your coding is triggered or maybe overwritten with other logic?
    If you are testing in your development environment, ensure you did build the complete model, not only the project/solution and perform a full database sync.
  • Sohaib Cheema Profile Picture
    49,434 User Group Leader on at
    Hi,
     
    Your DataSource remains as CustTramns_DS.AllowEdit(false) because of base method (else case after if)
     
    You may want to to make that allowEdit(true) in your custom code.
     
    Look at the else case in the standard form, that is making the datasource non-editable.
     
     
     
    You must mention following line, after the call of base method (in your extension)
    custTrans_ds.allowEdit(true);
     
  • Suggested answer
    Waed Ayyad Profile Picture
    9,023 Super User 2025 Season 2 on at
     Hi,
     
    Adding this line custTrans_ds.allowEdit(true); will make all fields in custTrans Datasource editable, I think you should make sure to prevent editing on the fields that shouldn't be editable.
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     
     
     
  • Martin Dráb Profile Picture
    237,709 Most Valuable Professional on at
    Another approach is not trying to make closed transactions editable by users and rather add another way to update this field, such as a button that updates the field from code.
  • CU13111016-0 Profile Picture
    4 on at
    Yes, it is not editable because of the code: custTrans_ds.allowEdit(false)
     
    I was thinking if maybe there is a way of enabling only this one field since I don't want enable all of them , others should not be editable. I know the approach of enabling all of them and then using global method for disabling all of them also and enabling just this one, but the thing is that there is some logic for some fields that should be editable based on some parameters and some fields should not and I didn't want to mess it up somehow.
     
    I was also thinking about that approach of adding button for updating the field but first wanted to check if anyone can help me with enabling this field only.
     
    Thank you all for suggestions
  • Deepak Agarwal Profile Picture
    8,598 on at
    Please be mindful when making such changes, My thought would be if MS is not allowing this editable, there is some good business reason behind that. 
  • Waed Ayyad Profile Picture
    9,023 Super User 2025 Season 2 on at

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

    Thanks,

    Waed Ayyad

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 687 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 535 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 403 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans