TwitterLinkedInBlog

Tuesday, December 9, 2014

Excel Services: Configure a workbook to use the unattended service account


'Data' tab > 'Connections' > data connection > 'Properties' > 'Definition' tab > 'Authentication Settings' button > 'None' radio button > OK > OK > Close.
 
With the Excel Services Authentication Settings set to None, Excel Services uses the unattended service account to refresh the data in the workbook after you have published it to SharePoint Server 2013.

Resources:
http://technet.microsoft.com/en-us/library/hh525344%28v=office.15%29.aspx

Monday, November 24, 2014

Application Pools Not Starting After Reboot

IIS Manager > Computer Name > Configuration Editor > Section dropdown > system.applicationhost > application pools > (Collection) > eclipses (…) > select application pool > startMode > AlwaysRunning.

Source:
http://msdn.microsoft.com/en-us/library/ee677285%28v=azure.10%29.aspx

Tuesday, September 30, 2014

Copying/Moving SharePoint 2010 Designer Workflows



Consolidated directly from:

http://chanakyajayabalan.wordpress.com/2012/01/02/copyingmoving-sharepoint-2010-designer-workflows/



  1. In the first(source) site, create the required workflow and publish it.
  2. Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as source workflow).
  3. Now go to the destination site where you want the workflow to be copied, and create a new workflow with the same name as the previous one & publish it.
  4. Now select Export to Visio option which allows you to save the workflow with a .vwi extension. (Refer this workflow hereafter as Destination workflow).
  5. Now you will be having two .vwi files (one of source workflow’s – SourceWorkflowName.vwi and other of the destination workflow’s – 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 destination 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 and run it.
PS : In case if your list’s GUID’s (for those lists that you have used in workflow – tasks list, history list or any other lists used in workflow steps) have been changed from source & destination site, you may need to update those steps in the workflow.

-----

Instead of creating zip files, just open the source and destination workflows in SPD and overwrite the wfconfig file from source to destination from All files option in SPD and thats it!

Export Multiple Lists into a Single Excel File

This is simply a copy of a clever TechNet Forum answer for reference:


After you click Export to Excel and open the owssvr.iqy for the first list, do not close the Excel file, change the connection name from owssvr to something else in Data->Connections->Properties.
go to the next list and click Export to Excel, choose new worksheet instead of new workbook. And rename the connection to the second list from owssvr to something else as before.
This way, you will get one data connection for each list in the same workbook. Save the workbook back to .xls after finishing the last list.

Tuesday, August 26, 2014

PowerShell - Get-SPLogEvent

get-splogevent -StartTime "08/26/2014 01:00" -EndTime "08/26/2014 14:00" |?{$_.Correlation -eq "8b49fbf8-7da2-43k7-ad49-5p02277bc598"} | select Timestamp, Area, Category, Level, EventID, Message | Format-List

Friday, August 22, 2014

Blog - Post.aspx - Intermittent Unable to display this Web Part

Intermittent on Blog Post.aspx:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
Correlation ID

-----
$myfarm = Get-SPFarm
$myfarm.XsltTransformTimeOut
1
-----
$myfarm.XsltTransformTimeOut = 5
$myfarm.Update()
------

Reference:
http://thechriskent.com/2012/06/18/intermittent-unable-to-display-this-web-part-messages/

Friday, August 8, 2014

ItemStyle.xsl - All Field Names

<xsl:for-each select="@*">
    Field Name :<xsl:value-of select="name()" />
</xsl:for-each>

Monday, July 28, 2014

InfoPath 2010 - Web Browser Form

'File' > 'Info' > 'Advanced form options' (At the bottom) > 'Form Options' > 'Compatibility' > 'Form type: Web Browser Form'

Wednesday, July 23, 2014

Content Query Web Part (CQWP) - Author with Presence

Exerpt taken directly from:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious

Add the following template to "ContentQueryMain":
 <xsl:template name="OuterTemplate.AuthorPresence">
  <xsl:param name="Author" select="." />
  <xsl:variable name="sEmail" select="ddwrt:UserLookup(string($Author) ,'EMail')" />
  <xsl:variable name="sID" select="ddwrt:UserLookup(string($Author) ,'ID')" />
  <a href="{concat('/_Layouts/userdisp.aspx?ID=', $sID)}" onclick="GoToLinkOrDialogNewWindow(this);return false;">
   <xsl:value-of select="$Author" />
  </a> 
  <img src="/_layouts/images/blank.gif" height="1" width="3" />
  <a href="javascript:" class="ms-imnlink">
   <img width="12" height="12" border="0" src="/_layouts/images/blank.gif" valign="middle" class="ms-imnImg" name="imnmark" alt="No presence information" title="" id="{concat('MWP_pawn_',$ClientId,'_',$sID,',type=sip')}" sip="{$sEmail}"/>
         </a>
 </xsl:template>

This is dependant on adding a reference to the ddwrt namespace in :
xmlns:ddwrt=http://schemas.microsoft.com/WebParts/v2/DataView/runtime

And it is called and referenced like the following in ItemStyles.xsl :
<xsl:variable name="DisplayAuthor">
 <xsl:call-template name="OuterTemplate.AuthorPresence">
  <xsl:with-param name="Author" select="@Author" />
 </xsl:call-template>
</xsl:variable>            
<p>Created By:  <xsl:copy-of select="$DisplayAuthor" /></p>

References:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious


Tuesday, July 22, 2014

XSL Security Trimming without SPSecurityTrimmedControl - ddwrt IfHasRights()

<xsl:if test="ddwrt:IfHasRights('2')">
    <div>
        <img src="/_layouts/images/caladd.gif" alt=""/> <a><xsl:attribute name="onclick">javascript:NewItem2(event, "/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=");javascript:return false;</xsl:attribute> <xsl:attribute name="href">/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=</xsl:attribute>Add new announcement</a>
    </div>
</xsl:if>


From C:\Program Files\Microsoft Office\Office14\CAML2XSL.XSL:

 <!-- keep in sync with global.cs!!!
     EmptyMask               =0x0000000000000000,
        // list/document perms  =0x000000000000XXXX,
        ViewListItems           =0x0000000000000001,
        AddListItems            =0x0000000000000002,
        EditListItems           =0x0000000000000004,
        DeleteListItems         =0x0000000000000008,
        ApproveItems            =0x0000000000000010,
        OpenItems               =0x0000000000000020,
        ViewVersions            =0x0000000000000040,
        DeleteVersions          =0x0000000000000080,
        CancelCheckout          =0x0000000000000100,
        ManagePersonalViews     =0x0000000000000200,
        // UnusedList10         =0x0000000000000400, /* obsolete ManageListPermission */
        ManageLists             =0x0000000000000800,
        ViewFormPages           =0x0000000000001000,
        // UnusedList20         =0x0000000000002000,
        // UnusedList40         =0x0000000000004000,
        // UnusedList80         =0x0000000000008000,
        // web level perms      =0x0000XXXXXXXX0000,
        Open                    =0x0000000000010000,
        ViewPages               =0x0000000000020000,
        AddAndCustomizePages    =0x0000000000040000,
        ApplyThemeAndBorder     =0x0000000000080000,
        ApplyStyleSheets        =0x0000000000100000,
        ViewUsageData           =0x0000000000200000,
        CreateSSCSite           =0x0000000000400000,
        ManageSubwebs           =0x0000000000800000,
        CreateGroups            =0x0000000001000000,
        ManagePermissions       =0x0000000002000000,
        BrowseDirectories       =0x0000000004000000,
        BrowseUserInfo          =0x0000000008000000,
        AddDelPrivateWebParts   =0x0000000010000000,
        UpdatePersonalWebParts  =0x0000000020000000,
        ManageWeb               =0x0000000040000000,
        UseRemoteAPIs           =0x0000002000000000,
        ManageAlerts            =0x0000004000000000,
        CreateAlerts            =0x0000008000000000,
        EditMyUserInfo          =0x0000010000000000,
       
        // special perms        =0xXXXX000000000000,
        EnumeratePermissions    =0x4000000000000000,
        // end of list
        FullMask                =0x7FFFFFFFFFFFFFFF,
 -->

Resources:
http://sharepoint.indigoreality.com/2012/05/04/sharepoint-2010-ifhasrightspermissionmask/
SPBasePermissions enumeration

Saturday, May 31, 2014

PowerShell - Properties

$var = get-spfarm
$var | get-member -membertype property

Thursday, May 29, 2014

PowerShell - Custom List - Delete All Versions

$web = Get-SPWeb "http://localhost"
$list = $web.Lists["MyList"]
foreach ($item in $list.Items)
{
  $item.Versions.DeleteAll()
}
$list.EnableVersioning=$False
$list.update()
$web.Dispose();

Update: This seems to have issues, so need to follow up with better solution.

Friday, May 23, 2014

Get Content Database Name with PowerShell

Get-SPDatabase | Where-Object { $_.TypeName -eq "Configuration Database" } | Select Name

Sunday, May 18, 2014

Windows Explorer - Favorites

Windows Explorer > Right-Click 'Favorites' > Add current location to Favorites.

C:\Windows\System32\drivers\etc

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14

C:\inetpub\wwwroot\wss\VirtualDirectories

C:\ProgramData\Microsoft\SharePoint\Config

Wednesday, May 14, 2014

Filter on Workflow Status

NotStarted = 0
FailedOnStart = 1
InProgress = 2
ErrorOccurred = 3
StoppedByUser = 4
Completed = 5
FailedOnStartRetrying = 6
ErrorOccurredRetrying = 7
ViewQueryOverflow = 8
Max = 15
OOTB Approval WF:
Canceled = 15
Approved = 0×10 (16)
Rejected = 0×11 (17)

References:
http://chanakyajayabalan.wordpress.com/2010/03/08/sharepoint-workflow-status-codes/

Friday, May 9, 2014

Word 2010 - Show Document Panel

Word 2010 > 'File' tab > 'Info' > 'Properties' dropdown > 'Show Document Panel'

Thursday, April 10, 2014

Extract Address from an Excel Hyperlink

Function HLink(rng As Range) As String
'extract URL from hyperlink
'posted by Rick Rothstein
  If rng(1).Hyperlinks.Count Then HLink = rng.Hyperlinks(1).Address
End Function


Reference:
http://blog.contextures.com/archives/2010/12/13/get-the-url-from-an-excel-hyperlink/

Wednesday, April 9, 2014

AppOffline.htm

Site Under Construction
App Offline

AppOffline.htm
Place this file in the root of the application.

Reference:
http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

Tuesday, February 11, 2014

Simulate iPhone or iPad with Safari

Safari > Gear icon > Preferences > Advanced > Check 'Show Develop menu in menu bar' > Alt > Develop > User Agent > [Safari iOS 4.3.3 - iPhone | Safari iOS 4.3.3 - iPhone]

Wednesday, January 15, 2014

BackConnectionHostNames Registry Location

BackConnectionHostNames Registry Location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

(Used to specify the host names that are mapped to the loopback address and can connect to Web sites on your computer)

Monday, January 13, 2014

Rename Web Application and Alternate Access Mapping Collection

$wa = Get-SPWebApplication | where {$_.Name -match "localhost - 80"}
$wa.Name = "My Web App"
$wa.Update()
$aamc = $wa.AlternateUrls
$aamc.Name = "My Web App"
$aamc.Update()


Resources:
http://www.topsharepoint.com/rename-web-application-in-sharepoint-2010