Displaying a custom form on a new item event in SharePoint 3 document libraries?

What is the best way to display a custom form for each new document added to a specific document library?

I want the user to have some control over some of the actions that will lead to the addition of the document, namely the tasks created for the users in the list of tasks that the user who will be given the user has to submit before he commits the operation.

Is this the best way to do it with Workflow or an event handler?

Moo relationship

+1


source to share


4 answers


For SharePoint Server 2007:

The combination of a specialized content type and an event handler will give you the most control over the process (easier to debug as well). The workflow is best for "simple" activities and more difficult to complete complex activities.



The workflow provides more flexibility when site admins assign a workflow to different libraries.

Flip your content type and event handler into a function that can be expanded. Assigning a content type to a list will allow you to get any data generated by a standard form (remember that you can create custom fields for really complex / custom data entry) and take any action, including creating item-based tasks.

0


source


Thanks for the answer, here is the route I was looking into, but unfortunately I didn't find a way to make it work for document libraries - only lists.

The problem I am facing is that the aving SPUtility.Redirect on ItemAdded, ItemAdding, ItemCheckingIn or ItemCheckedIn event in the document library does nothing because there is no page associated with events - all of which are not related to the web context because its webpage doesn't do the heavy lifting at this point, but rather the integration with Office.

All the examples I have come across seem to rely on the EditForm.aspx or NewForm.aspx page being displayed at the time the event is fired, which of course is not the case.



It also makes me unable to extend the EditForm.aspx or CheckIn.aspx page to do what I want, because Office 2007 bypasses both of those files.

So the only option left open for me at the moment is through a workflow: /

Any additional advice would be fantastic.

0


source


I may not understand your question, but how close is this to what you are trying to do?

http://msdn.microsoft.com/en-us/library/ms550037.aspx

If not, how does it end?

0


source


A new "Content Type" with its new form url matching the corresponding value should do the trick. Unfortunately, you won't be able to achieve what you are trying to handle with an event handler or workflow. Ideally, you would like the form to display as soon as the user adds a new element to the library, and the custom content type will do the trick.

  • Create a new content type. (Derive it from an existing content type)
  • Remove default content type from doc library.
  • Using the object model to set the url of a new form to an aspx page or an Infopath you create.

Respectfully,

0


source







All Articles