I have a Document library whose only content type allowed is my own custom "Document Set" Content Type.

My custom Document Set content type creates a number of sub-folders and and deploys files as can be configured in the "Document Set Settings."

I am having difficulty designing an ItemAdding event receiver so that it only acts on my custom Document Set and not on any other folder or file generated when a document set is added.

Because this is SharePoint Online I cannot create a farm solution and bind it to my content type and thus have to create a Sandbox Event receiver and bind it generically to "Document Library"

As such I need some type of test in the ItemAdding event so that I am only processing the my custom Document Set content type while ignoring all the other folders and files that are automatically created.

Thanks for your ideas.

  • Can you add an if statement to check if the content type of the item triggering the event is your custom content type? – wjervis Mar 12 '14 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.