Saturday, May 18, 2013

Deploying workflows from one server to another server in SharePoint 2010


Below are the STEPS to fallow to deploying workflows in SharePoint 2010 from one server to another.
Ex: Development server to QA or Production Server.

STEPS:
 

1)      Open Development site in designer and open TESTWORKFLOW workflow
2)      From Ribbon select Export to Visio option which allows you to save the workflow with a .vwi extension.  (Save as Name: SourceWorkflowName.vwi)
3)      Now go to the Production/QA site where you want the workflow to be copied, and create a new workflow with the same name TESTWORKFLOW & publish it. (Note: don’t add any step. Just publish blank workflow)
4)      Now select Export to Visio option which allows you to save the workflow with a .vwi extension.  (Save as Name: DestinationWorkflowName.vwi)
5)      Now you will be having two .vwi files (one of source workflows – SourceWorkflowName.vwi and other of the destination workflows – DestinationWorkflowName.vwi). Now add .zip extension to both the files. Now your files names should be SourceWorkflowName.vwi.zip & DestinationWorkflowName.vwi.zip.
6)      Now open both the zip files, copy workflow.xoml.wfconfig.xml from destination workflow to source workflow. (Its destination to source and not source to destination).
7)      From now on, we will not use the file DestinationWorkflowName.vwi.zip.  So ignore that file.
8)      Remove the .zip extension from SourceWorkflowName.vwi.zip which gives you the   SourceWorkflowName.vwi file.
9)      Now, go to the production site, open workflows and click Import from Visio and browse to the SourceWorkflowName.vwi file.
10)  That’s it and your workflow is copied. You can publish the workflow.

Thursday, March 28, 2013

Open Sharepoint document Library PDF files in New window

STEP1:


Edit the view page by selecting Site Actions  Edit Page.


STEP 2:

Click on “Add Web Part” and then select the Content Editor Web part from “Media and Content” category.










STEP 3:

Click on Content Editor web part

And then from ribbon select the Format Text HTMLEdit HTML Source





STEP 4:

Copy and paste the below given JavaScript code in HTML Source and click on OK.

------------------------------------------------- CODE -------------------------------------------------------

<script language="javascript" type="text/javascript">



_spBodyOnLoadFunctionNames.push("OpenPDFInNewWindow()");



function OpenPDFInNewWindow()

{

var aAllLinks = document.links;

for(var i=0;i<aAllLinks.length;i++)

{

var oA = aAllLinks[i];

var sHREF = oA.href.toLowerCase();



if(sHREF.indexOf(".jpg") > 0

sHREF.indexOf(".pdf") > 0)

{

oA.onclick=function()

{

var w=window.open(this.href,'_blank','');

if(w) {

w.focus();

return false

};

return true;

}

}

}

} </script>



------------------------------------------------- CODE END-------------------------------------------------------







STEP 5:

Edit the Content Editor web part and set the options as below:


Referred  URLs, please check below URLs for more details:

Thursday, March 21, 2013

Don't Show Missing Image Icon Suppose you have html page that will display users profile with profile images and if image is not present, automatically missing image icon is appearing, it's looks unprofessional. We can hide this icon or replace with the default image. Simply Hide the missing image icon using Javascript: