My scenario : get the date format value from http web service call.

The date/time format is ISO format such as “2017-08-10T17:36:12Z”

Actual local time(Perth) is 11/08/2017 1:36:12.

However when I tried to save the field value as Date/Time workflow variable, exception happens like below error message.

The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local

Without the last character ‘Z’ is working to conversion and set the date/time variable.

  • Copy from [StrOriginalISOFormatWithZ], starting at 0 for 19 characters(Output to [StrTempISOFormatWithoutZ])
    • [StrOriginalISOFormatWithZ] : 2017-08-10T17:36:12Z
    • [StrTempISOFormatWithoutZ] : 2017-08-10T17:36:12
  • Set [DateTimeTmpVariable] to [StrTempISOFormatWithouZ]
    • [DateTimeTmpVariable] : 2017-08-10T09:36:12Z
  • Add 0 months, 0 days, 8 hours, 0 minutes to [DateTimeTmpVariable](Output to [DateTimeFinalVariable])
    • [DateTimeFinalVariable] : 2017-08-10T17:36:12Z

 

Date/Time Output format example

  • As String           : 11/08/2017 1:36:12 AM
  • ISO Formatted : 2017-08-10T17:36:12Z
  • Long Date  : Friday, 11 August 2017
  • Long Time : 1:36:12 AM
  • ShortDate  : 11/08/2017
  • ShortTime : 1:36 AM

 

Get Time Zone information for SharePoint site. (get Bias value)

[SharePointSiteURL]/_api/web/RegionalSettings/TimeZone

d/Information/Bias

{
“d”: {
“__metadata”: {
“id”: “[SharePointSiteURL]/_api/web/RegionalSettings/TimeZone”,
“uri”: “[SharePointSiteURL]/_api/web/RegionalSettings/TimeZone”,
“type”: “SP.TimeZone”
},
“Description”: “(UTC+08:00) Perth”,
“Id”: 73,
“Information”: {
“__metadata”: {
“type”: “SP.TimeZoneInformation”
},
“Bias”: -480,
“DaylightBias”: -60,
“StandardBias”: 0
}
}
}

Advertisements

Reference:

http://www.c-sharpcorner.com/UploadFile/58e23e/call-http-web-service-using-sharepoint-designer-2013-spd/

https://code.msdn.microsoft.com/officeapps/sharepoint-2013-accessing-a90295d2

https://dev.office.com/sharepoint/docs/general-development/working-with-web-services-in-sharepoint-workflows-using-sharepoint-designer

 

*Sometimes you get unauthorized error from rest query.

just add “Authorization” with no value into request header dictionary.

https://sharepoint.stackexchange.com/questions/118876/call-http-web-service-unauthorized

*ISO formatted value is not saved into workflow date/time variable.-> so have to remove ‘Z’ character from string value and then save into workflow variable. adjust time variance using add time calculator function in SharePoint Designer.

*Check the date is Monday-> check the variable(Short Date) include ‘Monday’ Character

 

Get document name/page name

https://social.msdn.microsoft.com/Forums/Lync/en-US/a9db1de8-a182-455a-88fa-af918c6e22c1/get-document-name-from-2013-workflow?forum=sharepointcustomization

https://weblogs.asp.net/ricardoperes/looping-through-list-items-in-sharepoint-2013

Get FileRef value

select FileRef

Order by, Filter by datetime and paging

$orderby=DueDate desc

$filter=DueDate gt DateTime’2014-07-31T00:00:00’

$top=20

Get current time for SharePoint 2013 workflow.

http://myknowlex.blogspot.com.au/2016/01/sharepoint-2013-online-workflow-get.html

 

Sharepoint designer workflow string limit : 255 character (history log as well)

Sharepoint Workflow throttling : 5000 outbound request/24 hour period.

https://support.microsoft.com/en-us/help/3076399/sharepoint-2013-workflow-throttling-and-performance-in-sharepoint-onli

 

 

https://weblogs.asp.net/ricardoperes/getting-the-weather-forecast-using-sharepoint-workflows

 

Have to check the url exceed 255 character 

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

/items/?$select=*,FileRef,Author/Title,Editor/Title,File/Name&$expand=Author,Editor,File&$orderby=Modified desc&$filter=Modified ge datetime’2017-08-21T16:00:00Z’

/items/?$select=ID,Title,FileRef,Modified,Created,Author/Title,Editor/Title,File/Name&$expand=Author,Editor,File&$filter=Modified ge datetime’2017-08-21T16:00:00Z’

 

 

 

 

When I tried to get lookup item’s other field using rest query I got this error message

The query to field ‘LookupFieldName/ParentFieldName’ is not valid.

However LookupFieldName/ID, LookupFieldName/Title, LookupFieldName/Created works fine.

Seems only get the value following field types only.

  • Number
  • Single line or text
  • Date and Time

There are many cases

  1. https://sharepoint.stackexchange.com/questions/96059/custom-css-not-updated
  2. http://johnliu.net/blog/2014/5/27/sp2010-forcing-previously-deployed-file-to-update-to-latest.html
  3. https://blog.kloud.com.au/2013/05/27/file-element-module-overwriteifalreadyexiststrue/
  4. http://nileshmandekar.blogspot.com.au/2012/04/avoiding-javascript-and-css-stylesheet.html
  5. http://sharepointerz.blogspot.com.au/2012/11/gac-deployment-but-code-doe-not-update.html

In my case number 4 is the solution.

If I deployed the wsp into another DEV machine, the css updated but after deploying into UAT the css is not the new one. so use ‘rev’ parameter!

<link href=”/_LAYOUTS/ProjectName/mystyles.css?rev=<build-version>” rel=”stylesheet” type=”text/css”>link>

<script src=”/_LAYOUTS/ProjectName/myscript.js?rev=<random number>” type=”text/javascript”> script>

 

(Reference)
SharePoint 2013 Search not working for anonymous users
SharePoint 2013 Search not working for anonymous users

Displaying search results to anonymous users in SharePoint 2013
http://www.yurioyoko.com/2014/03/20/displaying-search-results-to-anonymous-users-in-sharepoint-2013/

$web = get-spweb “http://yoursiteurl/subweb/subsubweb”
$list = $web.Lists[“ListName”]
$list.BreakRoleInheritance($true)
$list.AnonymousPermMask64= $list.AnonymousPermMask64 -bor ([int][Microsoft.SharePoint.SPBasePermissions]::AnonymousSearchAccessList) #binary or adding the permissions
$list.Update()

 

 

Configuring SharePoint 2013 Search REST API for anonymous users
https://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/

Anonymous Crawl Configuration in SharePoint 2013
http://www.sharepoint24x7.com/2014/07/09/article-anonymous-crawl-configuration-in-sharepoint-2013/

Search Query Suggestions for anonymous users in SharePoint 2013–and with security trimming
http://www.techmikael.com/2013/03/search-query-suggestions-for-anonymous.html