Showing posts with label SharePoint OOB Feature. Show all posts
Showing posts with label SharePoint OOB Feature. Show all posts

Friday, February 5, 2016

How to add Print Option to SharePoint Page to print one particular web Part?


<input type="button" ID="printBtn1" OnClick="javascript:void(PrintWebPart())" value="Print">

<script language="JavaScript">

//Controls which Web Part or zone to print
var WebPartElementID = "WebPartWPQ2";

//Function to print Web Part
function PrintWebPart()
{
var bolWebPartFound = false;
if (document.getElementById != null)
{
//Create html to print in new window
var PrintingHTML = '<HTML>\n<HEAD>\n';
//Take data from Head Tag
if (document.getElementsByTagName != null)
{
var HeadData= document.getElementsByTagName("HEAD");
if (HeadData.length > 0)
PrintingHTML += HeadData[0].innerHTML;
}
PrintingHTML += '\n</HEAD>\n<BODY>\n';
var WebPartData = document.getElementById(WebPartElementID);
if (WebPartData != null)
{
PrintingHTML += WebPartData.innerHTML;
bolWebPartFound = true;
}
else
{
bolWebPartFound = false;
alert ('Cannot Find Web Part');
}
}
PrintingHTML += '\n</BODY>\n</HTML>';
//Open new window to print
if (bolWebPartFound)
{
var PrintingWindow = window.open("","PrintWebPart", "toolbar,width=800,height=600,scrollbars,resizable,menubar");
PrintingWindow.document.open();
PrintingWindow.document.write(PrintingHTML);

// Open Print Window
PrintingWindow.window.print();
PrintingWindow.document.close();

}
}
</script>

Tuesday, January 19, 2016

How to Copy List item to Another list using sharepoint designer 2013 workflow?

We can use the the REST services to move the items one to another list.
  • Add Dictionary is a new variable 
  • create a dictionary add Build Dictionary action
  • Accept and Content-Type
  •  set the values for both of them to application/json; odata=verbos
  • add key __metadata 
New item created from workflow 
call the web service
_api/web/lists/getbytitle('examples')/items and the HTTP method is POST. 
Set the request to your parameters dictionary. 
To set the header of your request go to :
Right click option

Call HTTP service -> properties -> RequestHeaders and set it to your header dictionary.
 

Thursday, October 22, 2015

How to import .ascx file in SharePoint 2013?

SmartPart  Webpart is  third party tool avaliable 

Great webpart to convert your user control into SharePoint 2010/2013 web part,

  1. Automatic deployment using the SharePoint Solutions Framework
  2. Manual deployment by copying and editing a couple of files
 Easy host any ASP.NET user control, basically allowing you to visually design the web part rather than write it in code. I’m sure you will all agree, this is a very useful tool!


http://smartpart.codeplex.com/

Page viewer Webpart In SharePoint 2013

  1. Go to the web part page
  2. Click the Page ribbon tab and click Edit Page
  3. In one of the web part zones, click Add a Web Part
  4. Click the Media and Content category
  5. Click Page Viewer and Add
  6. Edit the web part and add the URL to your report

Three properties available:
  1. Webpage
  2. Folder
  3. File




frame tag in SharePoint Script Editor Webpart

1.Select the gear icon .Click Edit Page

2.Edit Page Select Media and Content Categories

3.Add Script Editor Webpart

4.Click Edit Snippet


<iframe src="https://www.google.com/" width="200" height="200"></iframe>