locked
Restriction on attachments / notes RRS feed

  • Question

  • On a custom entity, is it possible to restrict the possibility to delete attached files in the notes section?

    I would like to make it impossible to delete any files attached.

    Thursday, March 5, 2009 6:20 PM

Answers

  • The best and supported way is to write a plug-in on the annotation pre delete, check that the annotation refers to your custom entity and throw an exception to stop processing.
    • Marked as answer by Carl I Friday, March 6, 2009 8:42 AM
    Thursday, March 5, 2009 6:28 PM

All replies

  • The best and supported way is to write a plug-in on the annotation pre delete, check that the annotation refers to your custom entity and throw an exception to stop processing.
    • Marked as answer by Carl I Friday, March 6, 2009 8:42 AM
    Thursday, March 5, 2009 6:28 PM
  • thanks for the quick feedback. Is there a more simpel sollution you can think of? ;)

    Thursday, March 5, 2009 6:34 PM
  • The notes url has a parameter that defines the update mode. you can hide the initial notes tab, create a new notes iframe with this parameter set to false. This might break on the next version though.
    Thursday, March 5, 2009 6:55 PM
  •  I've tried using the code you posted on this thread Adi:

    http://social.microsoft.com/forums/en-US/crmdevelopment/thread/894623ff-4f87-47c1-940c-34ca9faa8c9b/

    This code is suppose to do the same right? But i could really make it restrict deleting attachments. Any ideas why?
    Thursday, March 5, 2009 7:21 PM
  • I thought it would do that as well, i guess you're back at square 1 (a plug-in) which is really the way to go.
    Friday, March 6, 2009 1:43 AM