i want to use an array that contains all the fields and it will be hidden and use for loop to do it.
Inside the CRM MS i don't know how.
function hideShowPicklist(executionContext) {
var RequiredField = GetAttributeValue(executionContext, "requiredtype");
var ProcessField = GetAttributeValue(executionContext, "processtypecode");
if (RequiredField == "0" && ProcessField == "4" || ProcessField == "5") {
// it will Show the fields and set them as Required
SetAttrsVisibility(executionContext, "name", ",", true);
SetAttrsVisibility(executionContext, "managername", ",", true);
SetAttrsVisibility(executionContext, "fordealexecution", ",", true);
SetAttrsVisibility(executionContext, "registrationaddress", ",", true);
}
}
I want the code to be very short by using array and for loop.