Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
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 at 13:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.