none
Deleting a form after it's rejected in a Sharepoint 2010 Workflow

    Question

  • I have an Infopath form set up in a Sharepoint Library that goes through an Approval workflow. What I want to be able to do is have it automatically delete (from both the Library and the Tasks List) any form that has been rejected. I've been trying to do it through the workflow, but either I'm doing something completely wrong or I can't do it that way. Does anyone know how to do this?

    Edit: I tried using the "Delete Item" activity. I have:

            Delete item in Activities Request Forms (Field: Approval Status; Value: 1;#Rejected)

            then Delete item in Tasks (Field: Approval Status; Value: 1;#Rejected)

    It seems pretty simple to understand, but it still doesn't work. I don't know how else to change it to make it work.

    Thursday, February 03, 2011 12:21 PM

Answers

  • Yes, you just use the "Delete List Item" activity.  You said you tried it and failed, but you didn't tell us what you tried.  I don't know what else you would have tried besides that activity, and I know it works well, so please clarify.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Wayne Fan Thursday, February 10, 2011 1:15 AM
    Thursday, February 03, 2011 3:38 PM

All replies

  • Yes, you just use the "Delete List Item" activity.  You said you tried it and failed, but you didn't tell us what you tried.  I don't know what else you would have tried besides that activity, and I know it works well, so please clarify.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Wayne Fan Thursday, February 10, 2011 1:15 AM
    Thursday, February 03, 2011 3:38 PM
  • Hi Clayton!

    Good Day!. I too faced the same problem. I have been using the "Check Out Activity" and "Delete Item Activity" at the end of the custom worklfow develeped in VS 2010. All the time i end up in failure with error messate "An error has encountered in ......". Infact, i have added the context, ListId and ListItem for bothe acctivities in the property window. I woulda appreciate if you could shed some light on this.


    Consultant / Analyst

    Sunday, June 17, 2012 9:30 AM