2016-12-14

Setting Related Item on a SharePoint 2013 Worfklow's SingleTask

Sometimes when we design workflows it is necessary to set related item in SingleTask to something different than the default listitem. Default list item is the item on which workflow was started. So, lets say we start workflow on doc1.docx. Inside the workflow we define SingleTask. This SingleTask, when opened in SharePoint UI, will have, by default, a link to doc1.docx. Sometimes we would like this SingleTask to have related item which is different than that particular doc1.docx.

Microsoft has intended for this purpose SingleTask argument named RelatedContentLinkListItemIntegerId. Great, you just set the list ID and item ID and you have your problem solved. Wrong!! Setting this property will have no impact on related item. At least, not if you use default generated SingleTask activity.

The solution:
Setting RelatedContentLinkListItemIntegerId will only work if you delete a particular child element in workflow markup (XAML). So, first open your workflow in Code mode (Visual Studio View Code - F7). Then locate the SingleTask activity which you would like to configure. This should be p:SingleTask XML element. Delete p:SingleTask.RelatedContentLinkListItemId child elemet. Save your workflow and voila, it will change related item to whatever value you set it.

2016-10-07

SharePoint 2016 Application Pools and Other Processes Stop Immediately After Starting

At one point of developing SharePoint 2016 Farm solution on my dev machine SharePoint application pools, namely web application pool and CA application pool, started to crash on start. I restarted the server and then all of a sudden no SharePoint services (SharePoint Timer Service, SharePoint Tracing Service) could be started.

All google results pointed to faulty application pool account. I double checked that account was not locked and had appropriate perms. No luck there.

System Event log was full of events 5002, 5009 and 5011.

After inspecting a situation with Process Monitor we pin pointed an error to missing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\Location value in the registry. After adding C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ data to Location value all services went back online after server restart.

Only change in server configuration that day was installment of Microsoft Office Professional Plus 2016. I don't have time to investigate what caused deletion of aforementioned value in registry but I am eager to find out.

Hopefully, I will edit this post if I find out more details.

2016-05-02

OpenQuery Failed with status ID: 0x800007d0

ULS on my clients' farm was polluted by messages "OpenQuery Failed with status ID: 0x800007d0" every few seconds.

Turns out I had to add user which is running mssearch.exe process (SP_Search in my case) to local group called Performance Monitor Users. After adding the user I rebooted the machine and the problem went away.

2016-02-17

Shared Folder Permissions When Running Backup-SPFarm

I have setup a farm according to Medium Security Option on Vlad Catrinescu's blog. I setup a backup of this farm using Backup-SPFarm powershell script. If I grant read/write permissions to Everyone on shared folder everything works fine. But if I limit permissions only to SP_Admin account backup fails.

The solution is to grant the following accounts read/write permissions to shared folder:

  • SP_Admin 
  • SP_Services 
  • SQL_Services 

where SP_Admin is the user account which executes the script.