Hi All,
In the button SalesInvoiceDuplicateOriginal, the if condition () , I like to modify the code for if only
Kindly let me know how I can achieve this? So, that my custome code for If will run and the existing if code will skip
Pls give me more shed on this.
thanks!
Yes please, call to next is same as call to super. So write before next statement.
Yes, you can write the code before next().
Thanks Mohit,
Shall I write the code before next method?
We are saying to duplicate the form control, create extension class for form control. Create CoC on clicked method, use exact same code and just replace super() with next Clicked(). Make changes in the if condition. hide the standard form control (button).
When you do this, it will not call standard code that you have in screenshot.
As suggested by Anton and Mohit, requirement can be achieved in the said way.
For your question, you cannot skip the standard. Because if there is only if, we can simply make the buffer empty so if can be skipped and again it goes to else. So we cannot or it is not possible here to skip the code. You can proceed by the suggestions of Anton and Mohit.
Thanks Mohit and Anton
Let's clarify one things
Suppose I have create an extension class for that duplicate button. And before next I need to write the code.
My question is
Here it will first executed my custom code and then executed next SalesInvoiceDuplicateOriginal
Once it come to next then it will again executed the if condition correct?
That I dont want to executed.
I like to run my custom code only instead of this.
2. In the above pic, it is getting the value from args to get the current record value correct?
In my custom code , I mean in extension class how to call this args value there?
Please give me more shed on this
Hi, In this scenario, you can't bypass standard logic. As Anton suggested, you can duplicate this button, hide original button and change the code in clicked method of duplicated button. So user can see only your button and your custom code will be executed.
Thanks Anton
You mean to say in for the form CustInvoiceDuplicateTable_W, I need to create an extension and
Then need to add a new button with same label like SalesInvoiceDuplicateOriginal.
Am I correct?
If correct, then let me know what to do next?
Pls give me more shed on this
Create an extension of the form. Add your own button to the form with the same label and add code that you want. Set the visible property of the original button to false.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156