Hello Martin.
Apply and Ok are command button. I am referring to InventMarking form.
Business req is to run a custom code let us say its info("Hello custom code") when user clicks on Ok or apply.
For this COC was done on closeok() and doApply() method of the form and Info ("Hello custom code") was added in both COC.
During debugging it was notice that doApply() is called even when you click only Ok at form.
This is causing ("Helo custom code") to appear twice, 1 from COC of closeok() and other from doApply()
So I removed info("Hello custom code") from closeok() .
Now when user clicks on Apply I get info("Hello custom code") and then when user clicks on Ok I again get info("Hello custom code")
Hence need is to validate at COC of doAppply () if apply has been clicked before ok, if yes then do not run custom code nfo("Hello custom code").
Thanks
Mav