locked
make notes manadatory crm2011 RRS feed

  • Question

  • Hi All,

    How to stop saving record if there is no Notes added for the reocrd? That means Notes should be mandatory for the record to create.  


    NarSr If you find this answer as help ful please vote as helpful and if you find this as answer Please Mark It as Answer :)

    Monday, April 9, 2012 6:45 AM

Answers

  • Hi NarSr,

    The notes are a separate entity that has a foreign key that refers to the record they are attached to. For this reason you can't create a note until the primary record has been saved. If you have a requiremet to prevent users from saving a record until a note has been added, I suggest you add a custom field for the notes and make it mandatory/required. You could always make plugin to copy this field to a notes entry on save.

    Hth,

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, April 9, 2012 6:56 AM
    Answerer

All replies

  • Hi,

    you can do it on Onsave event. write javascript to get notes record based on the id if count equal to zero then show alert message and prevent record to save.

    Note:- Make sure your script work on UPDATE Mode. if you are looking to do this in case of CREATE Mode as well then that is not possible.


    • Edited by _Vikram Monday, April 9, 2012 6:57 AM
    Monday, April 9, 2012 6:54 AM
  • Hi NarSr,

    The notes are a separate entity that has a foreign key that refers to the record they are attached to. For this reason you can't create a note until the primary record has been saved. If you have a requiremet to prevent users from saving a record until a note has been added, I suggest you add a custom field for the notes and make it mandatory/required. You could always make plugin to copy this field to a notes entry on save.

    Hth,

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, April 9, 2012 6:56 AM
    Answerer
  • Hi NarSr,

    In my case, i have the same requirement on update the entity record. So i made a REST call to the notes entity to check any records available by passing the entity id as a parameter.

    As Scott mentioned, you could create a text area to capture the notes during new form save and use of plugin(Post create) to copy the content and attached it to notes entity.


    SAFI

    Monday, April 9, 2012 7:12 AM
  • Hi Scott,

    Thanks for quick response. Yes, you are correct!. So creating custom filed is only the option left for me?


    NarSr If you find this answer as help ful please vote as helpful and if you find this as answer Please Mark It as Answer :)

    Monday, April 9, 2012 7:18 AM
  • Hi NarSr,

    Yes, I think so for create/first save.

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, April 9, 2012 7:40 AM
    Answerer