SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL
SharePoint, Office 365, Azure, and Front end JS geek. – Chicago IL

SharePoint Designer

Get Design View back on SharePoint 2013 (woohoo!)

Want to use Design View on a 2013 site?  Well, now you can.

With a Fiddler HTTP function we can adjust the server response to say “14” instead of “15” and open any SharePoint 2013 site with SharePoint Designer 2010 to have access to classic Design View.   Obviously there are downsides to this approach (not formally supported), but it also can be useful in many scenarios.  Check it out and please leave a comment if you find this helpful.

 

Instructions

  1. Download Fiddler http://www.telerik.com/fiddler
  2. Download SP Designer 2010 http://www.microsoft.com/en-us/download/details.aspx?id=16573
  3. Launch Fiddler, press Ctrl + R, and update the Custom Rules JS file with the code below
  4. Launch SP Designer 2010 and open site URL
  5. Have fun!

Fiddler

You need to add Custom Rules to Fiddler.  There are two options:

  1. Download CustomRules.JS with custom logic
  2. Copy the below code and add to your local CustomRules.JS file in the function OnBeforeResponse(oSession: Session).

 

Use Cases

  • Support upgraded 2010 sites.    If you developed with SP Designer 2010, you might need Design View to support sites after upgrade to 2013.
  • New HTML and CSS creation.  WYSIWYG can be great for making simple files to support new JavaScript development.
  • DataFormWebPart .  Create blank ASPX page, add the DataFormWebPart and Conditional Formatting with WYSIWYG, then copy finished <DataFormWebPart> code tag into a 2013 native ASPX page.

Notes

  • Non intrusive approach.   Fiddler runs local on the developer’s machine.   No server changes or changes for end users.
  • This doesn’t give you Design View of any native 2013 ASPX page.  Those are fundamentally different with new Minimal Download Strategy async load, new master page, and other stuff so it just shows a gray background.
  • Not formally supported.
  • Cool way to support SP2010 upgraded sites.

References

 

homer-computer-woohoo

 

5-8-2014 3-41-29 PM

Manually Run “Pause Until” SharePoint Designer Workflows

Recently I needed to simulate a future lapse in time in order to manually trigger the “Pause Until” SharePoint Designer function.  In the example below, the SharePoint server is a local DEV virtual machine running in Oracle VirtualBox.  That means it receives time from the parent machine.

 

Action Steps

  1. Move VM host clock forward 1 day (24hours)
  2. Move VM guest clock forward 1 day (24 hours)
  3. Run the Powershell command “Get-SPTimerJob | ? {$_.name –like ‘*workf*’} | Start-SPTimerJob

 

What the above steps will do is to simulate a future date and then trigger the SharePoint workflow engine.  If the engine finds any past-due activities (ex:  “Pause Until ___”) then it will execute those immediately.  Using this technique you can build “Pause Until ___” workflows and still test them to ensure everything completes as expected, without having to actually wait the full time. 

Smile

 

image
image
image
image

SPD Best Practice: Ctrl C+V Quick Backups

To quote Asif Rehmani (@asifrehmani) from www.sharepoint-elearning.com … “SharePoint Designer is like a really sharp knife.   It’s very good at what it does.   You might cut yourself.   But you don’t stop, just act more carefully.”

 

With that lesson well learned over my years with SharePoint customization I must say my favorite trick of all is the simple quick copy/paste backup.   Any time and every time I’m about to jump off a cliff to dive into SPD coding I perform a Quick Backup:

  • Highlight the file
  • Ctrl+C    (copy)
  • Ctrl+V    (paste)
  • Breathe a sigh of relief

Storage is cheap.   Mistakes are not.   Time is one of our most scarce resources.   Buy some insurance with a Quick Backup!  

Hot

 

image
image

_WPQ_ with Javascript for dynamic lookup

If you’re using the trusty CEWP (Content Editor Web Part) to locate the current web part frame on a page you’ll want to consider using the “_WPQ” expression instead of hard coding a number.    Using the Internet Explorer Developer toolbar or Firebug toolbar is a great way to locate <DIV> tags and “ID=” attributes with a single click.

However, don’t be tempted to code in the number.    As you re-order web parts they will changes.    If you add more than one CEWP (export/import) the others will fail.    Use a dynamic token for maximum flexibility.

SharePoint’s rendering engine does a search replace on “_WPQ_” to give it the number of that web part on the page.   It’s a great way to avoid naming conflicts and a trick I’ve used to apply multiple JQuery driven CEWP on the same page.

 

References

image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲