Setting SharePoint Workflow approver from code - forms

I am converting our Word HR forms for use on our intranet. I am creating them using InfoPath 2010 and Publishing to SharePoint forms library. I have prepopulated some fields such as name, telephone, manager etc by querying Active Directory. I need to setup an approval workflow and the first approver will always be the users manager. The manager field already has the manager populated but I don't know how to dynamically add it to the workflow.

If you are using a Person/Group Picker within InfoPath, you will need to promote the AccountId field to make it accessible to SharePoint workflows. This can be done when you publish your InfoPath form.
You can then assign the value of AccountId to first approver in your workflow.

Related

Sharepoint column not appearing in generated email

I am modifying an existing SharePoint 2013 site that has an existing web form with various textboxes that the user can fill in. When this data is saved it generates an email with the info the user has entered. I added in another column and textbox for the user to fill in. Although it displays within SharePoint(After it saves), the new column & data does not display in the generated email. Any ideas what may be wrong?
If the notification email is generated by workflow on the list, you would need to modify the workflow mail activity to include the new field.
Use SharePoint designer to check workflows for that specific list.

Create a Workflow for email notification using SharePoint 2010

I had to create a workflow to create an email notification every time the content is modified.
The Email should go to a specified set of owners and a publisher.Can anyone walk me through the steps?
You need to create workflow in SharePoint designer 2010 and set the workflow start options when item is edited. In the workflow designer from workflow commands double click on email and configure it.
http://office.microsoft.com/en-ca/sharepoint-designer-help/introduction-to-designing-and-customizing-workflows-HA101859249.aspx

Workflow form generated by SharePoint designer 2007 not seen by users

I’ve designed a form for a user here to collect data for a workflow. I used SharePoint designer to build a custom approval form. When the workflow is initiated I am receive and email to ‘Edit Task’. I click on the Edit Task button and it takes to the form. I enter the information requested and my tasks lists and calendar are updated. However when I set the email to go to the user who will be entering the data( approval) the ‘Edit Task’ Button takes him to an error page “404 page not found”.
It seems that when I created the form SharePoint saved it to a local server and not to the Sharepoint server. I notice that the out of the box workflows go to this directory: http://vaww.visn16.portal.va.gov/sites/HOU/IMS/VistA/Help/_layouts/...
However my form is in the Workflow directory: http://vaww.visn16.portal.va.gov/sites/HOU/IMS/VistA/Help/Workflows/
I use my Explorer to go to My Network Places and I can see the directory for my workflow and workflow form. However other users with my same permission can get to the Workflow directory but only they cannot see the form. The other files associated with the workflow are present for them. Why can’t others access(see) the form? Users that I have asked to test this workflow all have full permissions like me.
Make sure the page that you navigate to when you click the Edit Task button is not checked out to you. If it is checked out, check it in and others should be able to see the page.

How to customize emails generated by adding a task in sharepoint designer

the email that is generated when a task is assigned by sharepoint workflow doesn't fit my needs and I would either like to customize it. If anyone knows how to customize this email, please let me know.
The best thing to do is to disable the default email alert on the task list by going to list settings. Then create another workflow on the task list that gets triggered on item creation and only when the item creator is the first workflow. Then use a send mail activity from designer and you can customize that to your heart's content.
http://office.microsoft.com/en-us/sharepoint-designer-help/video-create-an-approval-workflow-in-sharepoint-designer-2010-VA101897477.aspx (or http://www.youtube.com/watch?v=wfGDBzQvAwI)
Starting at 5:37, this video show how to customize the email sent by a workflow task using SharePoint Designer 2010.

SharePoint send an email to users specified in a Field

I have a SharePoint list of Issues and have set a column (called Alert) to a “Person or Group” (allowing multiple names).
I would like the system to send an email to all the users listed in the Alert field, if the respective Issue is modified.
How do I set the Workflow to send an email the users as specified by the data in the Alert field (if there is any)? I know how to use the Workflow etc – the problem the “To” part of the Workflow's email.
(Sorry if this item has already been tackled – I've searched Stack Overflow and Googled around but could not find an answer)
Preferably through SharePoint Designer. i.e. preferably with no Code.
Regards.
I have limited experience with SP Designer workflows, but have you tried the email action with "Workflow Lookup" selected in the To field? This allows you to use specific fields from the submitted list item.
You'll want to use the SPUtility.SentEmail method which will send an email to the string you pass it from using the context of the SharePoint server, saving you from writing the code youself to send it.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.sendemail.aspx
Use the "Build Dynamic String" workflow action to compose the list of email addresses. You can then use the dynamic string variable in the TO field. You can find the variable under "Workflow Data" in the lookup dialog.
I believe that the SPD workflows can only send to a person field that allows single selections. If you need to send an email to multiple users you will have to find a custom action (similar to http://www.codeplex.com/SPDActivities) or develop a Windows Workflow Foundation workflow using Visual Studio.
I have found a workaround to make the workflow send emails to multiple users entered under the field type Person/Group:
Create a workflow variable with type String
Assign the variable to Current Item field name and return type String
Then send an email To: Variable Name