For Approval workflow, We can use SharePoint in-built workflows or SharePoint designer workflows. Suppose if your client is not agree to use SharePoint designer workflows in your project then the only option
is to go with in-built workflows but SharePoint in-built workflow has certain limitations. Let’s see in detail.
In my requirement, I should not use SharePoint designer workflows or Object Model code. Only Infopath is allowed in my Project. So my ultimate choice is to play
I have to design Infopath form in Form library. It has to go to two levels of approval on submission. Infopath form should be attached in approval Email. The Managers should have approve the Infopath form from Email itself. Once the Manager is approved the
form, it should automatically go to the Higher level Manager for second level of approval through Email.
I have designed "Document Submission" InfoPath form and it should go for two levels of approval as shown below . Let's see in detail
Documents Submission Form :
This form is going to be accessed by three user groups such as Developer, Manager and Level II Manager. We have to specify roles for each user group and apply the rules to each roles. I’m going to apply rule
in such a way that
The below diagram explains the above scenario
Well, I know you have question in mind where to create roles and how to apply rules in Infopath form. Let me explain in detail.
The roles for each user will be mentioned in XML file. So whenever the user logged in the Infopath form, it will take the user id from userName function (available in Infopath) and retrieve the Role(User/Manager/Level
II Manager) of the user from the XML file, based on the role it will disable/enable the fields.
Refer the below link to retrieve the values from XML using web service in InfoPath
We have to write rules in Infopath to disable/enable the fields based on Roles.
Once the user submits the form it should go to Manager for first level of approval through Email (Manager Email given in the form). See the below Email Data Connection wizard.
Assign “Manager Email” field in “To” field.
After Submitting the form, Email will be sent to Manager with InfoPath form attached. In the "Submit" button , we have to write the following Rules
The Manager who received the Email can approve/reject the attached InfoPath form. Only the Manager Approval Section is enabled. So he can click Approve/Reject button in Manager approval section only. Once the
form is approved it will go to Level II Manager for approval.
Once the form is approved by Level II Manager, the Level II Manager approval and comments fields will be updated in SharePoint form library.