Posts

Showing posts from July, 2017

Update Multi-lookup field in SharePoint 2013 Workflow

Image
I was developing a SharePoint 2013 workflow using Visual Studio (SharePoint add-in) and I got following error while creating/updating list item with multi-lookup column. An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. I searched a lot but unfortunately I could not able to find solution anywhere. Then I remembered that SharePoint 2013 Workflow communicate with list using Rest API and I found how the API expects value for multi-lookup field. Single Lookup value format:  LookupFieldName: LookupIdVal Mutiple Lookup value format:  LookupFieldName: {"results":[LookupIdVal1,LookupIdVal2] } Now the challenge is how to provide this input since it is in JSON formatted string. Initially I thought that I have to provide JSON formatted string and tried to search for the solution but no luck. I have no clue how to build this. Got tired but at last, I got a clue from the following blog. Here, he i...

OneDrive and sites read-only maintenance error

Image
I came across an interesting issue recently while I was backing up a site collection via SharePoint Management shell & the backup process was abnormally terminated. This resulted in the Site being in Read only mode & the following message would show up when users browsed to the site. "We apologize for the inconvenience, but we've made OneDrive and sites read-only while we do some maintenance." I have no clue how to get out of this situation. When I searched for the solution everyone is talking about SharePoint online but I got this on SharePoint on-premise. But at last, I found the solution for this. Because of abnormally terminated backup process, the site collection went to read-only mode. Technically, it has put site to maintenance mode. I ran following script to make it normal. $Admin = new-object Microsoft.SharePoint.Administration.SPSiteAdministration("site collection url") $Admin.ClearMaintenanceMode()