Sharepoint 2010 and DispForm.aspx and adding custom - sharepoint

I am looking to add either a button to the ribbon or adding a form action button control to a list item display form.
I would like to user to have the ability to email the detail of the list item currently being view.
So far....
I created a new DispForm.aspx ...and then added the form action button control. I set the action to a custom action....then SP2010 created a new Site workflow.
I can edit this workflow..but I do not get fields for the "Current Item". I think this has something to do with the fact that its a site workflow and not a list workflow.
I also tried to edit the code in the DispForm.aspx to change the GUID of the workflow in an attempt to start a list workflow with the button.
help?

What I did to get this setup is first create a list workflow.
All work below is done in SharePoint Designer. And I did not edit any pages just created a custom action that showed up in the ribbon.
You can do this by selecting list and libraries from navigation then selecting the list you want to add the workflow to. Once you select that there should be a "block" for workflows just click add a new workflow. With that you can design your workflow and you will have access to current item.
Once you are done with the workflow find the Custom Actions block on the List page (It is below the workflows block for me). Click some where in the block and on the top ribbon you should see Custom Action. When you open up that menu it gives you the option to select the type of action (Ribbon, DetailView, ...). Now just link it to your workflow you just created. (You may have to refresh the list to get the workflow to show up. If it still doesn't show up make sure you published it).

Related

How to restore "view item" web part for Sharepoint List

I'm using Sharepoint 2010 foundation. We have a list available on the site that we use to manage work items. Normally, the options to view detailed list content are "View Item" and "Edit Item". It looks like someone accidentally deleted the list view for the "view item" page, so that when anyone opens an item, all they see is the list item title and a big blank box in the middle. Does anyone know how to restore the list view for a single list item so that we can view the item contents?
Alright; if your form was a non modified-form without further extensions or modifications you have only a few clicks ahead of you, otherwise: you better have a backup.
Disclaimer: I am using the german version of SPD, but the controls are at the same positions as in the English version. See screenshots for clarifications
Open up SharePoint Designer 2010
Open your SP Site
Open the list in question
Click on "new" (see Screenshot below)
Fill out the form (Enter name, check form to view, and default form)
Boom - you're good to go again. Save it.
You can download SPD here: http://www.microsoft.com/en-us/download/details.aspx?id=16573

Creating a ribbon custom button when inserting content to Sharepoing 2010

I want to create a button to popup a window and display a list that it's being requested to an external source. Then the user would click on one of the items to insert and iframe on the body of the post.
For this I think best way is to create a ribbon custom button right? How can I make it only appear when inserting content such as posts?
You need to create a custom action in your project. It's a small xml file that gets installed in the farm and dislays what ever you want. Check How to add a ribbon item using CustomAction in sharepoint 2010? for a sample and here for extended information on all the possibilities you have http://msdn.microsoft.com/en-us/library/bb802730.aspx

How to reset SharePoint 2010 List forms from InfoPath to the default forms?

I've converted a Custom List forms to use InfoPath forms using SharePoint Designer, now I want to revert this back and return to the normal New, Edit and Details forms.
How can I achieve this?
Edit: Here is what I did
In SharePoint Designer 2010 I Clicked on Lists and Libraries
Click on the List I modified
In the Ribbon I select Design Forms in InfoPath in Actions Group
I started to design the form like I want
I published the modifications to the List
Now I want to undo what I did and return to the normal New, Edit and Details forms
List -> List Settings -> there is some InfoPath forms server settings link that leads to the page where you can remove customization.
Changing default Edit/New pages will not help - you need to modify pages for default content type of this list if you want to go this route.
You should be able to do this in SharePoint without needing SP Designer.
Navigate to the list in SharePoint.
On the List ribbon bar, click List Settings.
Under General Settings, click Form Settings link (bottom of first column).
Select the Use the default SharePoint Form option.
You can also opt to delete the custom form by checking Delete the InfoPath Form from the server.
If you created new forms, in sharepoint designer, set the orginal dispform.aspx, editform.aspx and upload.aspx as default.
if you changed the original files, from the navigation pane, go to "All files" --> "/lists/your list" or "your library" --> forms.
Right click the changed files (a blue icon should be present) and then click on "Reset to site definition"
Please note that if you go into the List Settings and click on Form Settings you should see "Infopath" or "Sharepoint" as an option. If you do not see that the form hasn't been checked back in. Open the form back up in Infopath, Publish the form, then go back to your sharepoint list settings and select "Form Settings" from there you should now see the sharepoint option. Select that and you should be good.
If you are looking to hide some of the questions but still see them in Data View (alot of the reason why some of us are doing our forms in infopath) you can actually hide some of them by going to "Advanced Settings" and turning on "Allow Management of Content Types" then going into content type by selecting your list, and from there you can make all the changes by clicking on the column item. This is a great way to hide columns you don't need everyone seeing that you may need to make updates to (lookup columns etc)

Get a SharePoint InfoPath form to load in the browser from a task

I've published an InfoPath form, through the administrator route, to a document library. I can click new form on the document library and have my custom form load up in the browser. When the filled form is saved back to the list it fires off a workflow. The workflow creates a task for another user to go into the form and complete the missing fields (if there are any.)
The key here is that the partially filled form saved to the library needs to be the very same form opened in the first task. The link field of the task is automatically filled with the url to the list item, which is the xml for the partially filled form. The link is identical to that when you mouse over the item back in the document library but when it's clicked from the task it try's to open the form inside InfoPath itself and not inside the browser. So that's one problem with the link field that SharePoint automatically populates when you create a task.
Ideally I would want to associate the partially filled form with the task itself. I've done this before in workflow with infopath forms by putting the FormURN inside workflow.xml and then specifying the TaskType on the task. However this will create up a new form based on the template. How can I get it to use the existing xml on the list item which the workflow which the task is actually running on.
Suggestions would be very much appriciated.
Change the url to go this url
{SITE_COLECTION_URL}/_layouts/FormServer.aspx?XmlLocation={FORM_URL}&DefaultItemOpen=1
use the tutorial on this page and have a field on the forms ItemMetadata.xml called url and set it in the code
taskProperties.ExtendedProperties["url"] = SERVERURL + "/_layouts/FormServer.aspx?XmlLocation=" + FORMURL + "&DefaultItemOpen=1";
This is not the most elegant solution but does work well. You will need to modify the form to act as an action listener.
Instead of creating tasks, send out emails containing a link to the InfoPath. When the user opens the form customize the top of form to look like a task form with a checkbox, when the form is updated fire the workflow to check if the check box is complete, if so move on the workflow on.

View Page (DispForm.aspx) not associated properly for SharePoint list views

I've customized NewForm, EditForm and DispForm to allow users to create new, edit (with certain permission) and display service requests.
The forms work fine except in my views (e.g. Createbyme.aspx which shows all requests owned by me). Instead of pointing to my custom DispForm /[site]/Lists/[list_name]/DispForm_custom.aspx?ID=[request#], it links to /[site]/?ID=[request#].
Is there any suggestion for a fix?
I just answered this question in another post...
Restore NewForm.aspx file
To summarize,
Open the page and select the form control. Oen the propertis for that control and select the radio button "NEW ITEM FORM". After you save the page you can then select the page as a supporting file for the list and the setting will stick. Do not select the page as a supporting file first as the setting will not stick... ergo the order of your steps is important.

Resources