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
What is the exact use case here
Regards,
Vishwas
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(""); }
Hi @Vishwas
Thankyou.
It looks like you're new here. Sign in or register to get started.