locked
Disable form after adding document to document library with workflow RRS feed

  • Question

  • Scenario

    - A document library for excel files

    - After upload a workflow starts that reads the excel file and sends the information to a WCF service

     

    Problem steps

    1. Add document
    2. Browse document en select OK
    3. The properties form wants to display but an error is shown
    4. Close the error
    5. The workflow is started and everything runs normal

    So all I want is to disable the form that is shown after the OK button is pressed. I assume that the workflow is changing something before the form is displayed that causes the error.

    Thanks,

    Pieter

    Friday, July 1, 2011 10:00 AM

Answers

  • Hi Pieter,

    If I understand correctly, you configure the workflow to start automatically when an item is added. In a matter of fact, when a document is uploaded, the item is added. Then SharePoint will redirect end-users to EditForm.aspx, this is for updating custom fields. It is not "Added", but "Updated".

    In this case, I agree with you the error should be caused by the workflow is changing something before "updated".

    The possible solutions to fix the issue are that:

    1. Remove all customized fields from the library. Then the form won't be shown.
    2. Set the workflow to be "Start Manually", then customize a Event Handler, and start the workflow programmatically in event ItemUpdated.

    For more information, please see:
    Howto Start a Sharepoint Workflow Programmatically: http://www.tonytestasworld.com/post/Howto-Start-a-Sharepoint-Workflow-Programmatically.aspx
    Writing a simple Event Reciever or Event Handler in Sharepoint: http://nishantrana.wordpress.com/2009/01/05/writing-a-simple-event-reciever-or-event-handler-in-sharepoint/

    If you have any more questions, please feel free to ask.

    Thanks,
    Jinchun Chen


    Jinchun Chen Forum Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)
    • Marked as answer by Wayne Fan Monday, July 11, 2011 3:44 AM
    Tuesday, July 5, 2011 6:57 AM
    Moderator