Skip to main content

Posts

Showing posts from March, 2019

SharePoint Designer 2013: Unexpected Error on server associating the workflow

When you try to publish the SharePoint 2010 reusable or list workflow using SharePoint designer 2013 you will get following exception in UI. This could be because during the workflow publishing phase, SharePoint will create few temporary files under the temp folder. As part of the clean-up process the w3wp process will delete these temporary files at a later stage. Sometimes the process deletes the folder itself instead of deleting the files alone due to which the workflow may fail to publish. Solution: 1. Navigate to C:\Users\<service-acct>\AppData\Local\Temp on both the server (WFE1 and WFE2) 2. Create a text file inside the temp folder and in the properties check read-only option. 3. Reset iis /noforce 4. Publish the workflow. If the temp folder is not available, please create one and add the file inside it. 

Service Unavailable Error while accessing SharePoint Central Admin

Central Administration in SharePoint Server is where you go to perform administration tasks from a central location.  Sometime we encounter the "Service Unavailable" error message while trying to access the central admin.  Please follow the steps below to resolve the issue. 1. Open the IIS.  2. Expand the server name. 3. Click on Application Pools. 4. Please check whether the Central Admin application pool is started. If not, please start. 5. Also check whether the Central Admin site is started by expanding the "Sites". Sometimes the issue persists even after starting the application pool and the site. In that case, please go to the application pool. Click on advanced settings-> Identity->Please enter the credentials in the App Pool Identity and save.

You are not allowed to respond again to this survey SharePoint

Survey is similar to a custom list in SharePoint.  Sometimes we encounter an error  “You are not allowed to respond again to this survey”  while trying to respond to a survey. This may be because the survey is set to allow single response from a user. This setting can be changed by using the survey settings page. Settings of the survey -> Title, description and navigation  and set   Allow multiple responses  in survey options to  Yes. Sometimes they are chances of getting the error the first time you respond to the survey. This can happen, due to the following reasons. The user clicks on browser back button Survey is not completed fully and tried to complete it after sometime. Network issue This may be because there may be a branching logic in your survey.  Once you click on the next button your entry is done in the back end i.e item is added and from now on you will be editing your response.

Populate drop down options based on another drop down selection - javascript

Requirement:  Filter drop down list options based on another drop down selection. Sample code: $("Select[title$='dropdown1']").change(function(){ var val=$(this).val(); if(val=="Fruits"){ $("Select[title$='dropdown2']".html("<option value='Apple'>Apple</option><option value='Orange'>Orange</option>"); } else if(val=="Vegetables"){ $("Select[title$='dropdown2']".html("<option value='Onion'>Onion</option><option value='Tomato'>Tomato</option>"); } });

Connecting to SharePoint site using PnP- Power shell and perform basic list operations

Sometimes we fall into a situation when we had to add items to SharePoint list through power shell script. Power shell script can be run only when we have access to the server. But what if we had to run the script without server access??? PnP Power shell comes for the rescue! PnP Power shell can be used to connect to the SharePoint site and perform the operations. Connect to a SharePoint site: Connect-PnPOnline –Url "SiteURL"  –Credentials (Get-Credential) Get list: $items =Get-PnPListItem -List "Listname" List operations:  Add-PnPListItem -List "Listname" -Values @{"Columnname"="Value"} Set-PnPListItem -List "Listname" -Identity itemid -Values @{"Columnname"="Value"} Remove-PnPListItem -List "Listname" -Identity itemid -Force

Hide SharePoint list views based on current user

Scenario:  There is a SharePoint list with 2 different views -All Items.aspx, My Requests.aspx. The requirement is to hide the All Items view for normal users (All Items view should be visible only to a particular group of users). In simple words, the current user should be able to see only the items created by self and the other users with high privileges should be able to see all the items irrespective of who created it. The users can be restricted access to other items by setting the item level permissions for the list. Go to List Settings->Advanced settings->Item Level Permissions The other option is to hide the view by using javascript. $('.classname').hide();

SharePoint Designer workflow Canceled

Sometimes we encounter an issue when there is no error in the workflow steps but still the workflow fails. One such scenario is, the workflow starts on item creation and shows "In progress" for few minutes and then suddenly gets cancelled. We tried to troubleshoot the issue by adding a log on each step to check at what stage the workflow is getting canceled. And, here is the cause for the cancelling of workflows, 1. Email step which had invalid email address. (This holds good when the people picker field is empty). Try hard coding the email address or try with other "Return as" options for the people field (display name, email address, login name). EmailAddress is the best option to use. 2. Input was not in the correct format. 3. Workflow was published with less privilege user account. (Seems weird, but the issue got resolved when published as a site collection admin).

How to Publish a SharePoint Designer workflow with farm account credentials

Sometimes there is a need for the SharePoint designer workflow to be published with farm account when the user does not have the necessary permissions. Please follow the steps below to publish the SharePoint designer workflow with farm account credentials. 1. Open the SharePoint site in designer. 2. Your credentials will be taken by default. 3. Select the site home page from the left menu. 4. Under "Customization", please click on "Edit site home page". 5. When the signed in user does not have the high level privileges, SharePoint designer prompts to login with the account with elevated privileges. 6. Use your farm account credentials to login and you are all set :) 

Cannot find SPsite object - Powershell

I recently encountered an issue when I tried to run a power shell script to return items from the SharePoint list. There was no error with the code but still the script threw an error at the Get-SPsite line of code. Following are the steps which helped me resolve the issue. 1. Restart the SecurityTokenServiceApplicaitonPool. 2. Start the world wide web publishing service. 3. Start the SharePoint Central Admin.