I do this without problem in other forms, am I missing something here:
var lobaseform = solutionModel.getForm("c6reportflex1")
var loform = solutionModel.cloneForm("c6reportflex2", lobaseform);
var lobtn_canc = loform.getButton("btn_cancel");
var lobtn_ok = loform.getButton("btn_ok");
The form c6reportflex1 has buttons on it with those names. I want to change the position of the the buttons on the cloned form, but lobtn_canc and lobtn_ok are both null. What’s wrong?
Hi Michael,
Do you use perhaps inheritance on this form ? I.e. are the buttons on the parent form and you try to access them on the child form ?
If so you can’t access those object (but you can in 6.0).
Thanks, but no, the form being cloned isn’t extending another, and isn’t a clone itself. When I display the new clone form, the buttons appear in the UI. But when I try to access them in code, they aren’t there. I noticed the same thing for form variables that were present in the original form, but not accessible via the soultionmodel. BTW - this is ver. 5.2.6
M.S.
OK - the reason is because the button is returned in solutionmodel as a label, I’m thinking possibly because showclick and showfocus are both false.
Yes, when showClick is false then it’s essentially a label (and what turns a label into a button when enabled).