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'd like to be able to change (add/delete) the approvers associated with the OOB Approval Workflow that I have associated with a InfoPath form library on SharePoint 2007. I want to change the approvers from within my InfoPath form, I do not want to go to change it in the Workflow settings.

Is this possible in SharePoint 2007? If not, do I need to create a custom workflow? If so, what would be the high level steps that I would need to take to get something like this set up with InfoPath 2007/2010 form deployed to a SharePoint 2007 form library?

Thanks.

share|improve this question
add comment

migrated from stackoverflow.com Oct 29 '11 at 18:12

This question came from our site for professional and enthusiast programmers.

1 Answer

There are two methods you can use AFAIK:

A. Inject the approvers to the Association Data from code behind.

    SPWorkflowAssociation wrkFl = docLib.WorkflowAssociations[0]; 
    site.WorkflowManager.StartWorkflow(itm, wrkFl, wrkFl.AssociationData, true); 

~Create an eventhandler. Make sure you publish the approver field from the InfoPath form to a list column (you can also read the InfoPath XML, but requires more code). ~Grab the approver field value and pass it to the associationData string.

B. Pass the approvers into the Approvers parameter of the Approval Workflow during design time

For more info:

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.