Even if this is unsupported, this will work to full fill the requirement
just paste the below code on laod of the JS and call the function(form_onload) from onload
function form_onload(){
if (Xrm.Page.ui.getFormType() == 4) // suppose i have taken the condition as disabled or inactive record
{
//Need to attachEvent, because IFRAME elements load asynchronously, and elements like 'newNoteButton' are not accessible on form load
var iframe = document.getElementById("notescontrol");
//Hide 'Create a New Note' link
window.frames[0].document.getElementById('newNoteButton').style.visibility="Hidden";
var NotesTable = window.frames[0].document.getElementById('NotesTable');
//Disable the entire table
NotesTable.disabled = true;
var TextArea = NotesTable.getElementsByTagName('TEXTAREA');
//It's still necessary to individually disable the Textareas where users edit the existing notes.
for (i=0;i
TextArea[i].disabled = true;
}
}
}
hope this helps.
is this thing will work on d365 version.?
ReplyDelete