Hello Team,
I'm trying to show/hide + Add button on sub grid based on attribute value. I'm having 2 sub-grids with different views(same entity) on my form , one is displaying all records and 2nd one is displaying only related records.
i did customized +New button command and added new custom enable rule with custom Java script web resource using ribbon work bench and it's working fine for the sub grid with All records view but not working on the sub grid with only related records view . Did i miss anything ? Any help would be appreciated . Thank You.
function DisableNewButton() {
var approved = Xrm.Page.getAttribute("ca_approved").getValue();
if(approved == true)
{
return false;
}
else{
return true;
}
}