Modified dialog message in method clicked

Hii friends!
I created a dialog message box in the form in the clicked method, then I want to call the modify method which I marked in yellow. how is the code?

Pls advice me to get this,

Thanks

I’m sorry, but what do you mean by “how is the code”? It’s not clear to me what you need from us.

sorry, in the code dialogVABank.registerOverrideMethod(methodStr(FormStringControl, modified), ‘dialogVABankModified’,this);
i want to call method (SalesInvoice:dialogVABankModified).
because kode ‘dialogVABankModified’,this cant work call method SalesInvoice:dialogVABankModified

Your code is trying to call dialogVABankModified() method on the object in this variable. The type of the variable is FormStringControl class, which doesn’t have any dialogVABankModified() method. Unfortunately you didn’t tell us what happened, but I assume you got a runtime exception telling you that such a method doesn’t exist.

By the way, you should never hard-code method names, as you did at line 41. If you used methodStr(), the bug would have been found already during compilation.

Your code placement look wrong to me - the logic for the change of a bank isn’t behavior of SalesInvoice button. Even if it wasn’t wrong, putting business logic to form controls is a bad practice, because such code can’t be reused and it may cause problems with upgrades of the form. If you move your logic to a class, you can then easily refer to its methods (and you can also use the dialog at other places, if needed).