For some values in Activity type field, other two fields(Build Product and Build Project Code) should be mandatory, What is the best script for executing this condition.
Hi @Bhargavsai
You can write script in behavior something like this. Select "Activity Type" as field and in server side script add this script. You need to replace Custom field id of other 2 fields you have to set as mandatory.
def Cf1 = getFieldById(getFieldChanged()).getValue().toString()
if ( Cf1 != null){
getFieldById("<Custom field id of Field 1>").setHidden(false);
getFieldById("<Custom field id of Field 1>").setRequired(true);
getFieldById("<Custom field id of Field 2>").setHidden(false);
getFieldById("<Custom field id of Field 2>").setRequired(true);
}
else{
getFieldById("<Custom field id of Field 1>").setHidden(true);
getFieldById("<Custom field id of Field 1>").setRequired(false);
getFieldById("<Custom field id of Field 1>").setFormValue("");
getFieldById("<Custom field id of Field 2>").setHidden(true);
getFieldById("<Custom field id of Field 2>").setRequired(false);
getFieldById("<Custom field id of Field 2>").setFormValue("");
}
Regards,
Vishwas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vishwas
Thankyou.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.