Hey guys,
I was wondering if anyone faced the same issue in D365.
I actually have a dialog (Runbase) where i want to override the "modified" method for a dialog field, So i used the "Register Override Method" just like i did to override a lookup (that is working just fine).
Here is my code that i'm naturally placing in the "Dialog" Method of the class :
DialogField.registerOverrideMethod(methodStr(FormStringControl, modified),methodStr(MyClass, MyMethod), this);
The issue here is that my method "MyMethod" is working and the code inside is executed correctly, but when i change the value of the field and i leave the field, i get this :
Hi Dmitry,
it actually helped me haha :)
Thank you for your time.
Hi GoProX,
It's quite a time from your question but still can help others.
The probably answer is you have to return true in your override method.
it should looks like:
class MyClass { private boolean myMethod(FormStringControl _control) { boolean ret = _control.modify(); //instead of super() if you need it. //place your code here. return ret; } }
Yeah i've tried to override the validate method too to make it return true just to be sure if it's the validate that is responsible of this. still facing the same problem.
And like i said, it works with no problem for other methods, it's just the "modified" that gets stuck
It's hard to say what is wrong without seeing actual code. Warning that AX shows you is caused by validate method not returning true, so you need to figure out if validated is called and if it returns true.
Hi Ievgen,
Yes i'm already calling it in my method as you said. did it ever work for you in AX 7 ?
Hi Mohammad,
In my case i'm passing 'this' it's the same here.
Hi GoProX,
MyClass.MyMethod accepts FormStringControl as a parameter, lets say FormStringControl _control.
You need to call _control.modified();
in MyClass.MyMethod to trigger actual modification, so it will act as a super().
Hi GoProX,
In your code registerOverrideMethod method's last parameter should be your MyClass object.
Are you using SysOperationframework ? Use UI builder class there you will see postRun ,PostBuild method.
Look at class PurchReqStatisticsUIBuilder to see example.
Thanks for the reply,
There is no "PostRun" method, only "DialogPostRun" and i tried that, still not working.
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156