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

Community site session details

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

Calling modified() method of extended controls

(0) ShareShare
ReportReport
Posted on by 87
Hello,
 
I am going to explain my case.
 
I am customizing a standard form, let's say ExampleForm. In this form i created a custom ComboBox control (ComboControl).
 
I made the form code extension and the control code extension. In the control code extension I do CoC of the modified method. In the form code extension i am calling 3 methods of ComboControl. selection(), allowEdit() and modified().
 
Well, this is when werids things begin. selection call works, allowEdit call works, buut modified call doesn't. When i call modified it seems that only call the standard modified method but it doesn't go in the custom modified method in the ComboControl code extension class. You may think that the code in the custom modified method is incorrect but it works when i change the value in the form. So, CoC it appears to work correctly. Also, i created a example method in the control code extension that works correctly.
 
 
[ExtensionOf(formStr(ExampleForm))]
final class ExampleForm_Extension
{      
   void formMethod()      
   {            
      ComboControl.selection(value)     <---- It works
      ComboControl.allowEdit(true)      <---- It works 
      ComboControl.modified()             <---- It doesn't work properly            
      ComboControl.testMethod()         <---- It works      
   }
}
 
[Extension(formControlStr(ExampleForm, ComboControl))]
final class Exampleform_ComboControl_Extension
{   
   public void testMethod()   
   {      
      info(/test/);   
   }   
   public boolean modified()   
   {      
      boolean  ret; 
           
      ret = next modified();    
  
      //Custom code  
          
      return ret;   
   }
}
 
I also tried overriding the modified method with registerOverrideMethod, with the same results.
 
Calling modified method is something I used to do on dynamics AX 2012. 
 
Thanks in advance,
 
Eisenberk.
 
I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    Calling modified() method of extended controls
    Hi Eisenberk,
     
    I never faced this situation. I am not sure why the extension class doesn't get called.
    As a workaround only option will be implementing the code written on the modified method of extension class to the form extension class.
     
    Thanks,
    Girish S.
  • Eisenberk Profile Picture
    87 on at
    Calling modified() method of extended controls
    Hi GirishS,
     
    Yes, I have solved it by creating another method. I just wanted to share my situation. It must be something on the backend that I can't debug.
     
    Regards,
    Eisenberk.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

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

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 569

#3
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans