SharePoint 2010 State Machine Workflows with Custom Task Forms (InfoPath) using Visual Studio 2010 (Part 1)

How to create Infopath Form for Direct Manager Approve
Open Infopath Form Designer
 File | New | Blank Form | Design Form

Design UI as follows:

Right click field1 | Text Box Properties…| change Field name is Status
Ads not by this site
Ads not by this site

Right click field2 | Text Box Properties…

Change Field name is Comment
Ads not by this site

Right click to button | Button Properties…
Ads not by this site

Change label: Submit
Ads not by this site

UI after is changed as follows

Click to button Submit | On ribbon choose Add Rule | When this button is clicked | Submit data
Ads not by this site
Ads not by this site

At rule Details Box | Add

At Data Connection Wizard Choose | Create a new connection to: | Submit data then click Next

Choose radio “To the hosting environment , …” then click Next
Ads not by this site
Ads not by this site

Click Finish

Click OK

Rename for this rule is Submit Rule
Ads not by this site

Continue, click to button Submit | On ribbon | Add Rule | When this button  is clicked | Close Form (Image 10)

Click OK
Rename for this rule is Close Rule
File | click to Form Options
At Category | Security and Trust | uncheck Automatically determine … | choose Domain (…)
Remember check to “Sign this form template” and click Create Certificate …  if have not any certificate 
          
File | Publish | Network Location
Save this template 
Continue , click Browse… to publish this template
Save this publish template
Click Next 
Clear all text in textbox then click next (Image 20)
Click OK when Warning
Click Publish
Click Close
File | Form Template Properties 
Copy ID of Form as follows:
Save this ID to notePad
urn:schemas-microsoft-com:office:infopath:GeneralDirectorAppove:-myXSD-2012-03-23T08-37-10

Comments

Popular posts from this blog

C# - Changing controls properties in other forms in C#

Displaying Message Boxes in C#

How to set value of a field from sharepoint list