SharePoint Designer Workflow – E-mail Body String


So I was working on a SharePoint Designer workflow and it seems as though the e-mail body was not rendering or reading the text that was in the body, it was including all of the markup with it. I was trying to include the body of an email to log to the history list.

lookupbodyworkflow

When the workflow ran, the email body output looked like this:

Image

The problem here is that the Body column is allowing Rich Format. All you have to do is change the Body format back to Plain Text.
Image

Then try to use your workflow again using E-mail Body (as string). It should show up correctly now.

Moving SharePoint Designer Workflows


So I decided to make the move and promote my site to a site collection because they were getting a little big and put that site collection on it’s own content database. I used purchased 3rd party tools, so don’t ask me how I did that. ;) Anyway, I had these nicely developed Sharepoint Designer workflows that I have in the mix and I definitely don’t want to recreate them and I don’t want to lose them. How about moving them? Can I do that? I did some research and I’ll post how I did that successfully here.

(It’s been awhile huh?)

First, go to the site you have the workflows on. The source site if you will. From here, Click Site Actions -> Edit in SharePoint Designer.

From there Click the “All Files” in the Navigation, then click “Workflows”
allfiles

workflows

Right-Click the workflow you would like to copy. And go to “Copy”

copyworkflow

Don’t close SharePoint Designer. Go to your destination site (wherever you want to move these puppies to). Go to Site Actions -> Edit in SharePoint Designer.

Go to All Files -> Workflows (**If you don’t have “Workflows” available to you, you can make a quick SharePoint Designer workflow on a random list and publish it, then restart SharePoint Designer.)

Right Click and choose “Paste”. The workflows should be there, but they are not associated with the list that you want since SharePoint recognizes and attaches workflows to Lists and Libraries using their ListID. We can change that through the .xoml.wfconfig.xml

In SharePoint Designer, go to “Lists and Libraries” in the navigation, then select the list or library you want to associate the workflow with. This should bring up the List/Library settings.

listview

The ListID is what you are looking for. Copy this. Ignore the brackets, Mine will be:

35DAE9D1-85F7-4C95-A155-09072263F146

Now let’s go back to the workflow you copied over earlier. Click the “All Files” again in the navigation, then click “Workflows”, then click the workflow name. This should bring you to the files associated to that workflow.
Right-Click the .xoml.wfconfig.xml and select Open With -> SharePoint Designer (Open as XML). This is what you get.

wfconfig

The highlighted part is what you are pasting that ListID to. Delete the ListID, and paste the ListID you copied earlier here. Save the file and close down out of SharePoint Designer completely. Then start SharePoint Designer back up and you should see the Workflow available in the “Workflows” section in the navigation. Open the workflow up and hit Publish to publish it to the destination site. You should be good to go from there! Enjoy!

Hidden folders in Explorer View


I noticed this morning that one of my users (actually would be several, but this is the first user I troubleshooted) had 3 folders missing from the explorer view of a document library. They were oddly named with the first character being an underscore(_).

So digging a little deeper, I smacked my forehead and remembered that underscore is Windows’ way of determining whether or not a folder should be hidden. So I copied the folders to my desktop, deleted the folders on SharePoint, renamed them without the (_)underscore, and put the files back.

The user can now see the folders.

 

 

Discussion board threading in reverse chronological order


Your threading view should be set up as the following:

Columns:

  • Threaded(threading)

Sort:

  • First sort by: Threading -> Show items in descending order
  • Then sort by: Created -> Show items in descending order
  • Uncheck “Sort only by specified criteria”

Folders:

  • Show all items without folders
  • Show this view: In folders of content type “Discussion”

This setup worked for me.

 

Note: Do NOT change the Folder Option: Show in this view to “In all folders” or “In the top-folder level” because it will throw an error when using discussion boards of type: 

Attempted to use an object that has ceased to exist. (Exception from HRESULT:
0×80030102 (STG_E_REVERTED))

 

Redirection Options with SharePoint Forms


Excerpt from http://info.kraftkennedy.com/blog/bid/102004/SharePoint-Redirection-Options-in-Upload-and-New-Item-Forms:

When you click “New Item” in any SharePoint list or “Upload” in any document library, SharePoint sends you to a standard form for creating the new item.  Behind the scenes, SharePoint also passes in two parameters to let the form know where to post the item and where to go after the item is posted.  By leveraging these two parameters in the URL, you can make a link anywhere that posts data to any list and sends you someplace else when finished.  This has come in handy for us when creating intranet home pages, as we can create a list of links to post data to custom lists, which sends the person back to the home page afterwards.  Otherwise, the person would end up in the root of the list or library they submitted the item to.  So we were able to easily meet a requirement that the person be directed back to the home page after submitting the item.

A SharePoint new item link is structured as follows:

https://intranet.doman.com/site/Lists/listname/NewForm.aspx?RootFolder=/site/Lists/listname&Source=https://intranet.domain.com

The two parameters of interest are RootFolder and SourceRootFolder tells SharePoint where to post the document.  If it is removed from the URL then SharePoint will post data to the root of the list where newform.aspx is located.  You could also specify the path to a subfolder there, and SharePoint would post to that subfolder.  Source tells SharePoint where to go when the posting is complete.  The source needs to be a place in the site collection.  In the example link above it is back to the home page.  If source is left out of the URL then SharePoint will just return you back to the root of the list afterwards.

This is big with DVWPs. I have several DVWP with HTML Form filters on them. The DVWP document library form doesn’t allow a new item unfortunately, so I can instead make a link to the upload.aspx of that document library, and after changes are complete, SharePoint sends the user right back to where they clicked that link.

A DVWP upload form would be nice. Does anyone know what Microsoft is doing about DVWP and document libraries? I wonder if SharePoint 2013 will be more integrated and more options through SP Designer.

PerfomancePoint Dashboard Designer “Code blocks are not allowed in this file”


Yeah, where did this come from? Probably from your customized masterpage in the Business Intelligence Center. You have three options to get this error to go away.

  • 1. Fix it in web.config.
  • 2. Reset the masterpage to v4
  • 3. Reset v4.master to it’s original definition.
  • To fix it in the web.config you have to add:

    <PageParserPath VirtualPath="/site/Pages/ppssample.aspx" CompilationMode="Always" AllowServerSideScript="true" />

    Easy enough, right?

    SharePoint Access Web Database


    I learned this feature just today, so I decided to write about it. I found that Access Services on SharePoint 2010 will take care of your database in the form of a new subsite of the site collection that you have in place. You are basically importing the database tables that you want to publish to SharePoint into a new web database. This web database is your road to SharePoint, but you can’t simply convert an Access database into a web database, so you create a web database and import the tables from your Access database to make them web compatible. Here’s how I managed to do it.

    Create a new web database. Inside the new web database go to the External Data tab and select the “Access” button in the ‘Import & Link’ section. Search for the Access database that you want to grab the tables from.

    Select the database you want to pull from. Also it will ask you what tables you want to import, as well as advanced options…

    From here you should Publish to Access from the File menu, considering everything went smoothly.

    Type in the Site of your SharePoint site collection and Name the new web database (this will also act as the URL). Publish it and navigate to your new site!

    Here’s your new web database site! Edit the Tables/Queries/Forms just like you would any document!

    When you are finished you can Sync the changes from Access!

    Follow

    Get every new post delivered to your Inbox.