Hi Guys,
I put this code in component controller - Event -- onEvent of WD component vcPerAddressUSDetail. But this code fails to execute. If I remobe the subtype check in the code it works fine for all the sub types. My requirement is to limit the mandatory check only for emergency sibtype which is 4.
Any help
String areacode = null;
String phonenumber = null;
String subtype = null;
subtype = wdContext.currentSubtypesElement().getSubtype();
if (subtype == "4" )
{
areacode = wdContext.currentSelectedInfotypeElement().getAreac();
phonenumber = wdContext.currentSelectedInfotypeElement().getTelnr();
if (phonenumber == null || phonenumber.trim().length() == 0)
{
wdComponentAPI.getMessageManager().raiseException("Please enter Telephone Number",true);
}
}