During development, I wrote code in clicked event of Button. But requirement is that code will works only if form is in edit mode. I used following code to check it
boolean _bool;
supper();
_bool= element.inViewMode();
if (_bool==boolean::true)
{
info (“true”);
}
else
{
info (“false”);
}
This method element.inViewMode() return true when form is view mode.