Showing posts with label SPD. Show all posts
Showing posts with label SPD. Show all posts

Monday, March 20, 2017

Users break dispform

In this particular case a user decided to throw away the main webpart of the dispform.aspx. This caused all kinds of problems since it was a calenderlist.
In this situationen it wasn’t possible to create a new list since a lot of coded things worked with listids. Theres no versioning of dispform.
I first tried to use restore to sitedefinitions, but this kind of change didn’t qualify for making restore for some reason.
So this what came instead.

1. Find a functioning “vanilla” dispform.aspx from a list of same type
2. Open Sharepoint Designer, goto website of above list, find list and copy ListID
3. Find dispform of functioning list and export to file. Save locally on computer
4. Open locally saved dispform with notepad. Find and replace listid of sourcelist with targetlist listID (in calenderar two matches)
5. Opensharepint Designer, goto website of broken list.
6. All Files>Lists><mylist>
7. Take a backup of dispform with export to file, just in case you mess up.
8. Import locally modified dispform
9. Changes take effect immediatly.

References:
https://support.microsoft.com/en-hk/help/2000858/listview-webpart-required-on-dispform.aspx-page-for-document-library

Friday, February 21, 2014

Extract year from date in SPD

Create Sharepoint Workflow 2010

1. Create 2 variables, wholedate and year

2. Define functions

Set Variable:wholedate to currentitem:start time   (return field as ISOFormatted)

  then copy 4 characters from start of variable:wholedate(output to:variable:year)

  then log variable:year to the workflow history list

image

image

References:

http://weblogs.asp.net/wesleybakker/archive/2010/12/28/get-datepart-in-sharepoint-designer-workflow.aspx

Thursday, February 20, 2014

Quick Steps in Lists

Often neglected, I find this hidden feature useful for making no-code solutions.
Its a bit messy though.
image
To create, go to SPD > List > Custom Action > Choose where the button should appear. Its not completly obvious in my opinion so I’ve listed the name and where they’ll appear below.
When creating the manually from SPD, we got more alternatives than when creating a Quick Step directly from the Webgui. For example we now can add a webaddress, which can lead anywhere, either a local place on the sharepoint or somewhere offsite.
image
Examples:
ListItem – Shows on the submenu on the listitem.
image
Edit Form – Shows in the Edit Form.
image
Display Form – shows in the Display Form.
image
New Form – shows in the New Form
image
View – Shows in the List Ribbonmenu
image
From this custom actions we can also configure where the link should appear to some degree by modifying the Ribbon Location ID
image
For example, the Display Form button lands in the Manage container per default.
image
If I want to move this icon to right part of the form, I can change the .Manage. to .Actions.
 image

References:
http://blog.furuknap.net/sharepoint-2010-ribbon-locations - nice overview of where we can place our buttons.







Monday, December 02, 2013

Getting your own themes on Sharepoint 2013

In 2010 it was really easy to change the theme. All you needed to was open Powerpoint and make it look good there and then upload and apply the design to 2010.

In 2013 it’s been some changes, to make it less easy. Powerusers, it would seem, have no longer the trust of the Microsoft guys. It wasn’t obvious so here one way to it in 2013.

  1. Download and install Sharepoint Color Palette Tool
  2. Run Color Palette Tool, change Group By to UI Groups to make more logical.
  3. Design to your hearts content, then save file to local drive (ex mydesign.spcolor)
  4. Open Sharepoint Designer to the root of your site collection
  5. Open All Files> _Catalogs\Theme\15\
  6. Drop your mydesign.spcolor in the folder.
  7. Create a new composed look to make it easy to switch to the new design
    1. Site Settings> Web Designer Galleries> Composed Looks>new Item
    2. Point to Theme URL to your mydesign.spcolor
    3. Copy other settings from another Composed theme. Make sure you pick same Master Page as you’ve based your Color Palette theme on.
  8. Now you can pick the new theme from the current site. Note that the composed theme seems to required to be created on every subsite, unless heritage can be activated in some fashion.

 

References:

http://www.microsoft.com/en-us/download/details.aspx?id=38182 – Microsoft Sharepoint Color Palette Tool

http://en.share-gate.com/blog/create-sharepoint2013-theme-using-color-palette-tool – more detailed description on the procedure. Founders of this procedure.

Friday, November 22, 2013

SPD 2013 error workflow

Error received for no apparent reason when creating workflow.

image

Errors were found when compiling the workflow. The workflow files were save but cannot be run.

Solution:

Clear out Website caches from %username%\appdata\local\microsoft\websitecache\

Note to clear out the contents of the site folders, not the folders.

After this shut down the SPD and restarted and everything worked again.

Also deleted contents of %username%\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache , which might contributed.

References:

http://lyndzhang.wordpress.com/2013/04/04/unexpected-error-on-server-associating-the-workflow/

http://support.microsoft.com/kb/2557533

http://geekswithblogs.net/ferdous/archive/2013/01/29/resolving-sharepoint-workflow-publish-error.aspx

Friday, September 06, 2013

Using retention events as reminders

In lists, we sometimes want email reminders when something is due. Maybe a contract is about to expire. Or a folder hasn’t been touched in a long time.

Using Information Management Policies we can use a datefield to initate a move or start a workflow. All built-in, although in the enterprise version of Sharepoint 2013.

  1. Create a datecolumn in your list.
  2. Create a workflow associated with the list. For example a simple email-wf. image
  3. List>List Settings>
  4. Permissions and Management>Information Management Policy Settings>Item>Enable Retention>Add a retention state
  5. Use the created date-column or another available date column, choose action. In this case the newly created workflow.
  6. Enter a listitem which is about to expire.
  7. Testrun by running timerjobs for the specific webapplication on the sharepoint server. The relevant jobs are in Sharepoint 2013 :
    1. PolicyUpdateProcessing
    2. ExpirationProcessing
  8. After all is verified to be working, it’s a good idea to change the timerjob intervals of above jobs. Default value is only once a week. Change this to daily at the appropriate time.

The timerjobs must be run in that particular order for this to work. After they have first run, for trial and error purposes, we can remove the policy and reapply to renew the policy.

Also some handy powershell for the occasion:

/> get-sptimerjob policyupdateprocessing

/> start-sptimerjob expirationprocessing

/> set-sptimerjob expirationprocessing –schedule ”daily at 07:00”

/> set-sptimerjob policyupdateprocessing –schedule “daily at 06:00”

Note that above assumes theres only one webbapplication. When there’s more the powershell needs to be targeting that specific application. Since all applications have these timerjobs.

image

References:

http://office.microsoft.com/en-001/sharepoint-server-help/create-and-apply-information-management-policies-HA101631505.aspx - general information

http://weblogs.asp.net/spano/archive/2012/03/17/sharepoint-expiration-policy-not-working.aspx

http://technet.microsoft.com/en-us/library/ff607833.aspx - start-spadminjob - seems to start all timerjobs.

http://www.danielroot.info/2012/08/information-management-policy.html - details

http://stackoverflow.com/questions/8545161/sharepoint-2010-retention-policy-not-working

http://weekbeforenext-blog.blogspot.se/2011/06/extracting-month-and-year-from-date-and.html

http://office.microsoft.com/en-001/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx

http://yalla.itgroove.net/2012/09/sharepoint-calculated-column-formulas/

http://blogs.askcts.com/2013/05/14/creating-a-timed-workflow-in-sharepoint-2010/ -

http://sarahlhaase.wordpress.com/2013/03/27/setting-up-automated-reminder-emails/

https://specmgt.wordpress.com/2011/10/26/documentexpiry/ -

Friday, March 22, 2013

Infopath and lookup columns in workflows

When creating items using workflows its important that the values are exactly matchable. For instance, if the value in the list is a lookup value from another list, like employes, its important that the value that gets sent is the actual ID of the employee.

Its gets more complex when using infopath to edit a workflow forms. Here we got another layer that needs to be exactly matched. In this instance we needed to use another lookupfield in the actual infopathform and pass that form variable to the workflow.

When getting values to a dropdown-list from a external datasource, like a sharepointlist, the default behaviour is that value is the same as display name. When this value needs to match to another lookupfield the value-field needs to be changed to ID. Otherwise the workflow will just die.

image

Monday, April 16, 2012

Color coding list view

I had a situation where a customer wanted different row-colors in the list view depending on certain values.
This could be solved using conditional formatting and a custom view.
To create a conditional formating on a list.
I had a situation where a customer wanted different row-colors in the list view depending on certain values.
This could be solved using conditional formatting and a custom view.
To create a conditional formating on a list.
1. Create a custom view in Sharepoint Designer
2. Create a Conditional format by marking a field, and pick it from Options ribbon.
3. Select Format Row and pick field name and choose conditions
4. In Style, choose category Background and Background-color
5. Save
image
Very handy for situations where certain conditions need to be highlighted given certain circumstances.
Referenser:
http://blogs.msdn.com/b/sharepointdesigner/archive/2007/11/09/an-introduction-to-conditional-formatting.aspx
http://davepyett.wordpress.com/2011/03/28/sharepoint-2010-list-views-formatting-tip/
http://sp365.co.uk/2011/09/sharepoint-designer-2010-conditional-formatting/
http://sharepoint.stackexchange.com/questions/20088/simple-way-to-color-code-a-column-in-a-document-library

Wednesday, March 21, 2012

Create a task-list with mailto-function

To create a tasklist with ability to receive mail the following steps were required.
1.Create a list based on Task, for example weeklymeeting
2. Create a list based on Announcements, for example incomming
3. In the list incomming, activate mailto support (Communications>Incomming e-mail settings>Allow list to receive e-mail)
4. In list incomming, create an associated workflow in SPD. Make it autostart when item is created.
5. Edit workflow to Create Item in weeklymeeting, copy relevant fields like Name and Body to new fields in weeklymeeting from incomming.  Then Delete item in CurrentItem.
image

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...