Hi all,
I want to get the boolean data type fields where value = yes, and instead of writing them to console i want to store in an array and set the value to a field. Can anyone help to update the below code to my requirement.
FYI- My CRM is online >9.0
function writebooleanfieldlables(){
var booleanfieldnames= [];
Xrm.Page.data.entity.attributes.forEach(
function (attribute, index){
if(attribute.getAttributeType() == "boolean")
{ booleanfieldnames.push(attribute.getName());}
});
if (booleanfieldnames.length > 0){
if(typeof console != "undefined"){
console.log(booleanfieldnames.join());
}
}
else {
if(typeof console != "undefined"){
console.log("No boolean field are detected");
}
}
}

Report
All responses (
Answers (