locked
CRM 2013 - How to disable the notes control for inactive records? RRS feed

  • Question

  • Hi,

    On CRM2013 I'm amazed that there doesn't seem to be a supported way of disabling adding / editing notes attached to a deactivated record - in fact I don't understand why this isn't default behaviour.

    Thanks for any comments

    Tuesday, April 15, 2014 3:15 PM

All replies

  • There isn't a supported way to handle this but with a little unsupported JavaScript you can do it.

    http://mahenderpal.wordpress.com/2014/03/17/disable-notes-section-in-ms-crm-2013-quick-tip/

    During the form OnLoad event - check the form type - Xrm.Page.ui.getFormType(), if the value equals 3 or 4 (read-only or disabled), use the code to disable or hide the link


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Tuesday, April 15, 2014 3:57 PM
    Moderator
  • I'm afraid this does nothing for me at all... so I found a possible method that looked promising

    notescontrol.control.set_isControlReadOnly(true);

    But this does nothing either...

    Preventing creating new notes is at least possible

    if(!AllowInsert)$('#createNote').hide();

    Wednesday, April 16, 2014 8:15 AM
  • Maybe not the cleanest solution, but you can write a plug-in which checks the regarding object status, and throws an exception if it is disabled. On the other hand it is 100% supported.
    Friday, April 18, 2014 1:07 PM