Hello all,
Happy new year!
I have a custom formtabpagecontrol added to oob markuptable form and requirement is to disable the custom tabpagecontrol based on certain conditions.
Can you please share code or refer OOB code where this is happening and that can be used for reference.
Currently when trying to do COC as shared in code below, I am not sure what line to put to turn off/disable the code.
Also please share how to get this done using event handler.
[ExtensionOf(formstr(MarkupTable))] final class myExtension { public void init() { next init(); if(markupModeul == MarkupModeType::Vend) { //Pls suggest what to write to disable myTabPageCtrl disable here which has autodeclartion as Yes. } } } }
Thanks
Mav
I would use CoC, because - as you see - it's easier to write and read. If you reject the easier way for some reason, be prepared for extra effort on your side.
I guess you made a mistake and you actually mean 'markupModule', which is a form-level variable. Try accessing it by name: formRun.markupModule. I guess it won't work (but who knows), and you'll need to add an accessor method via CoC and call this method from your event handler.
Hi,
Can you please share how do I get module information at event handler , like if module = moduletype::cust (this moduletype is readily available in COC but need to get this at event handler.
Thanks
Mav
In an event handler, you can do something like this:
FormRun formRun = sender; formRun.design().controlName(formControlStr(MarkupTable, MyTabPageCtrl)).visible(false);
Ahhh, did not used that, as intellisense was not autotyping myTabPageCtrl.enabled, however forced typed it now and voila it resolved the issue at COC level , thank you so much.
Can you share the suggestion for event handler.
Have you tried simply myTabPageCtrl.enabled(false)?
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156