Update Subsite Title using REST API in a SharePoint Designer Workflow

I need to change the name of a subsite when a field is filled into a list item. I found this helpful article about using REST API to update subsite information and have it somewhat working.

I get an ‘OK’ response code so its going through but it is not actually changing the site title.

Requests:     
RequestHeader: {"content-type":"application/json;odata=verbose","Accept":"application/json;odata=verbose","X-HTTP-Method":"MERGE"}
Metadata: {"type":"SP.Web"}
RequestContent: {"__metadata":"{"type":"SP.Web"}","Title":"New Site Title","Description":"Site updated from REST API","ServerRelativeUrl":"/teams/'SiteCollName'/'SiteName'/Old_Site_Title"}
RESTParameters: {"parameters":{"__metadata":"{"type":"SP.Web"}","Title":"New Site Title","Description":"Site updated from REST API","ServerRelativeUrl":"/teams/'SiteCollName'/'SiteName'/Old_Site_Title"}}

Responses:
ResponseContent: {"d":{"Title":"Old Site Title"}}
ResponseHeader: {"Transfer-Encoding":("chunked"),"X-SharePointHealthScore":("0"),"X-SP-SERVERSTATE":("ReadOnly=0"),"DATASERVICEVERSION":("3.0"),"SPClientServiceRequestDuration":("7"),"SPRequestDuration":("40"),"SPRequestGuid":("c4adad15-4f72-6f3c-b764-263d94a83a4a"),"request-id":("c4adad15-4f72-6f3c-b764-263d94a83a4a"),"MS-CV":("Fa2txHJPPG+3ZCY9lKg6Sg.0"),"Strict-Transport-Security":("max-age=31536000"),"X-FRAME-OPTIONS":("SAMEORIGIN"),"MicrosoftSharePointTeamServices":("16.0.0.7115"),"X-Content-Type-Options":("nosniff"),"X-MS-InvokeApp":("1; RequireReadOnly"),"Cache-Control":("max-age=0, private"),"Date":("Mon, 27 Nov 2017 18:14:59 GMT"),"P3P":("CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI""),"Server":("Microsoft-IIS/8.5"),"X-AspNet-Version":("4.0.30319"),"X-Powered-By":("ASP.NET")}

ResponseCode: OK

From the ResponseContent, the workflow is identifying the current Site Title so I’m on the right track as to what I’m changing.

I am using the HTTP Call Service in an App Step to send the request as a POST (also tried as a PUT, didn’t make a difference).

What additional information am I missing to get the sub site to update?

If you have an alternative way to do this, I am very much open to that as well.

SharePoint Designer 2013 Workflow HTTP Web Service on POST: Error – The given key was not present in the dictionary

Thank you for reading this. This is a bit long, but I’m trying to be as detailed as possible. Any help would be greatly appreciated. If more info is needed, please let me know. As info, I am not a (JavaScript) developer. I’ve been tasked to do as many things as possible OOTB.

Environment: SharePoint Online and SharePoint Designer 2013 (for workflows).

Scenario: Have a Team Site and a Subsite to it. When an item is added to a Custom List in the Subsite, the workflow is to find the matching task in the Task List on the Parent Site and mark the Task Status as “Completed”. (A variable is created in the workflow to match the item added to the list with the task.)

Success: Using the HTTP Web Service action to GET Task items via the Workflow. Evidenced by logging the response in a custom list using Create Item in List workflow action.

Issue: Using POST to add or update a Task to the task list. Continue to get the error {“error”:{“code”:”-1, System.Collections.Generic.KeyNotFoundException”,”message”:{“lang”:”en-US”,”value”:”The given key was not present in the dictionary.”}}}

Pre-conditions: Because we were going between site and subsite, we followed the articles to create elevated workflow permissions for use of the App Step. Did this on both the site and subsite. https://msdn.microsoft.com/en-us/library/office/jj822159.aspx, http://www.fabiangwilliams.com/2014/06/19/gotcha-on-sharepoint-designer-workflows-in-app-step/

Because this error seems to sometimes be illusive, decided to create the workflow on lists within the same Team Site to remove any possibility of authorization issue. Therefore the example shown below is not using APP Steps.

Trouble-shooting: Used Fiddler with Chrome to walk through and did not receive any errors. https://cann0nf0dder.wordpress.com/2016/09/12/getting-fiddler-to-work-with-sharepoint-online/. Viewed many, many articles also.

Workflow:

  1. Hard-coded a Variable = TempMatchString to match with a value in the Task List to bring back specific Task(s). Ignore first two lines of the workflow – will be used once the issue is resolved.

enter image description here

  1. Get Matching Task(s)

    • Build GET_RequestHeader Dictionary.
      Accept = application/json;odata=verbose as String and
      Content-Type = application/json;odata=verbose as String

    • Perform the GET HTTP Web Service request with URL: https://mycompany.sharepoint.com/HumanResourcesTS/_api/web/lists/getByTitle('ProgressReportTasks')/Items?$filter=(Title eq (%Variable:TempMatchString%)

    • Create Item in the SPListGETContent list to view the response.

    • Store the array returned in Variable “ListDataSet”. Note: I am using Get valueinstead of d/results. If I do the GET Call from the subsite I get the JSON returned with d/results as seen in most all articles online, but value when used on the parent site. I am not sure why this differs.

    • Count to number of items returned.
      enter image description here
  2. Get FormDigestValue

Read several articles stating need to set the X-RequestDigest to the FormDigestValue to POST.

Thank you!!

Don’t have the permissions to open several items in Sharepoint Designer!

I have download the trial-version of Sharepoint 365 and then i have downloaded the Sharepoint Designer 2013. Then I have connect Sharepoint Designer to my Sharepoint teamsite. But then when i want to use Sharepoint Designer most of the items are permission denied. How can I set the right-permission? I don’t understand i have setup these environments, Sharepoint contains only one user: ME. But I don’t have the permission on several items in the Sharepoint Designer. How can i solve this? Gr. P

How to fix SharePoint designer workflow publishing issue?

I have created the list workflow and just printing the history log to print a test message. I am trying to publish the workflow using my account but it always returning me below warning error message.

You do not have permission to do this operation. Ask your site administrator to change your permissions and then try again, or log on with a user account that has this permission. To log on with a different user account click OK.

I did below workaround but did not get work:

  1. Checked the site permissions for my account, all permissions are working correctly. I have full control, design and contribute access.
  2. Checked the permissions for SharePoint designer, this is working fine. I am Primary administrator from central admin.
  3. Checked the application pool. This is working fine.
  4. Reset the IIS.
  5. Also restarted the server as well once.

Can any one please advise what is the exact issue here?

enter image description here

Condition and action missing from Workflows in SharePoint designer 2010

I had this problem in SP Designer 2013 when trying to edit a 2010 platform workflow on a SP2013 server. It turned out to be a missing WSS.ACTIONS file. On the server, check the hive TEMPLATE1033Workflow folder for this file. It’s an XML file containing the conditions and actions available. If not found, it cannot display the actions.

sharepoint designer – Create multiple custom error message(user message) for validation in list

There are two types of validations at list level:

  1. Column validation: Here you could validate the values for a particular field. You can configure this from the edit column page – with different messages for different columns.

  2. Item validation: You need to use this when you have a rule that requires values of multiple columns. You can configure this from list settings -> validation settings.

However you cannot have two item validations configured.

So if you have multiple rules that require more than one column value to validate against, I would suggest two alternatives:

  1. Place a content editor web part on top of your edit item or new item form, and write these rules in plain text. So when any validation fails, users can read all these rules.

  2. You could run these validations using JavaScript. Again you would need to add the script to your edit or new page, and then based on the validation errors, you can give different alerts on screen.

When you tell you are a designer…

I'm just curious to learn the statistics. When you tell people, you are a designer, how do they respond? Most people have a general idea what what is a designer job. But, today, we have various types of designers (which is too many anyway! at least 9 according to this blog – https://blog.sagipl.com/types-of-designers/?).
So, my question is whether think you are a web designer or an interior designer (which would be in my case -…

When you tell you are a designer…

SharePoint Designer 2013 Workflow REST Permissions

I’ve successfully used REST in a HTTP call in my SPD 2013 workflow to break permission inheritance and assign unique permissions to various groups. I have another workflow where I want to re-inherit permissions or change the permission level for the existing assigned group on an item that has unique perms but no matter what I do I cannot get it to work.

I build dictionary with Accept and content-type set to application/json;odata=verbose.

I then set a variable with my URL like so: (workflow context:current site url)_api/lists/getbytitle/(‘ListName’)/items(ID)/resetroleinheritance

The request type is POST. Each time I run the workflow the permissions remain unique and nothing changes, I get a Bad Request response in the responsecode. What am I doing wrong?

I must mention that this is a document set, but I successfully broke inheritance via the same method, I now need to do the reverse if possible.
Thanks.