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, ...
Unanswered

Modifying a dialog field value at run time

(1) ShareShare
ReportReport
Posted on by 114
Hi.. this question has been answered before but I get a different error! In my form class I tried to override modified method of dfCustomerId but the second argument gives me error: The 'QuotationTable' argument of the 'methodStr' compile-time function does not specify a known class. I tried to put the name of form class instead and still getting the same error!
The dfCustomerId_modified is public and written under runDialog method directly
 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    Modifying a dialog field value at run time
    methodStr() checks if such a class and method exist and you indeed don't have the method in a class called QuotationTable. I also don't think that you can define the overriding method in a form data source. Instead, create a class for your method, create an instance in runDialog() and pass the instance as the third parameter of registerOverrideMethod().
  • Abdullah_Ahmed Profile Picture
    114 on at
    Modifying a dialog field value at run time
    Thanks for your response Mr. Martin... I'm a little bit confused about a couple of things:
    1- I created a class in the form class but I tried many times to create an instance but it always gives me error.. making the new class public doesn't help either.
    2- The third argument of registerOverrideMethod represents what? it should be overrideObject but which object will be overriden? the dialog instance?
     
     
     
  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    Modifying a dialog field value at run time
    1) You'll need to describe your problem before we can help you. Creating an instance of a class is the most basic step of object-oriented programming; I wonder what you may be struggling with there. Note that in F&O, you can't create a class embedded to a form; you need to add a class to your project.
    2) The third arguments provides the object of which the method (the second argument) will be executed.
  • Abdullah_Ahmed Profile Picture
    114 on at
    Modifying a dialog field value at run time
    Thank you.. it simply worked!
    I faced the problem that I can't set the value of dfCustomerName so I created the static method and assigned the dfCustomerName from the form to my private dialogField.
     
     
     
    and this is the line code in the form class in runDialog method:
     

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 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans