SharePoint Online Designer 2013 workflow, terminated on autostart - sharepoint

In SharePoint Online, I have a SharePoint Designer 2013 List workflow. The workflow can be started manually without any problems (I am starting it on a custom Documentset content type called "ServiceOrder").
When I set the workflow to start automatically when a "ServiceOrder" content-type item is created. The workflow terminates instantly.
Details: The values provided for the root activity's arguments did not satisfy the root
activity's requirements: 'DynamicActivity': Expected an input parameter value of type
'System.String' for parameter named 'UniqueId'. Parameter name: rootArgumentValues
I have created another simple workflow just to check if's able to start automatically, and the new simple workflow does start automatically.

Finally I understood what the error was.
I have created a variable named "UniqueId", which represents the items UniqueId (Guid). I'm using this variable in a REST call to "GetFolderById".
After I changed that variable name to UniqueGUID, everything worked.
Seemed like a reserved variablename needed to initiate some Azure automation etc.

Related

SharePoint 2013 on-prem Add-In EmailAssignTo on task list

I've created a Task List in my app web with a custom content type based on task. I want to be have an email sent when an item is assigned to someone.
Looking around it seems that adding EmailAssignTo="TRUE" to the List element in Schema.xml should do the trick however I see the following:
Warning 1 The 'EmailAssignTo' attribute is not declared.
EmailAssignTo doesn't seem to be documented by Microsoft. Am I going about this the wrong way?
Based on a quick PowerShell check/test the List property you want appears to be entitled EnableAssignToEmail, which expects a Boolean value.
Source documentation from MSDN:
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.enableassigntoemail.aspx
SPList.EnableAssignToEmail property
Gets or sets a Boolean value specifying whether e-mail notification is enabled for the list.

SharePoint 2013 TaxonomyFieldType in custom list has IsTermSetValid = False

I'm using Visual Studio 2012 to create a custom Site Column of type TaxonomyFieldType, a custom content type that uses it, and a custom list that uses the content type.
Everything appears to deploy fine. If I look at my custom site column it appears to reference the proper termset correctly. I can create a new list in the web UI that uses my custom content type just fine. However, my custom list created using the Visual Studio 2012 List template always shows my taxonomy field as disabled on the new form. Here are the other things I've witnessed about it:
In the web UI of SharePoint, if I go to the list properties and drill into my taxonomy site column I notice it shows that it isn't mapped to a termset. Keep in mind that if I do the same thing in Site Settings for my content type it appears correct. I can do the same thing for the web UI created custom list and everything is fine (editable in the new form and the field has the termset defined).
If I use powershell to dump out the info for the site column itself it has a valid termset.
If I use powershell to dump out the info for the field in the VS2012 created list it shows emtpy guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = False.
If I use powershell to dump out the info for the field in the SharePoint web UI created list it shows the correct guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = True.
Does anyone know why I seem to be having this behavior for the VS 2012 create custom list? Any help is appreciated.
Okay, so I'm going to answer my own question. Hopefully this will help someone else in the future.
My issue was that when creating a sample list for my content type (described in original question post), using the SharePoint UI, the needed Note field was getting added. Even if I had this right in my original TaxonomyFieldType declaration, I would have also ran into issues with my field values not showing up in the search refiners later on when I got to that part. Thankfully Ari Bakker has written a very detail explanation of what all you need to do in order to create your custom TaxonomyFieldType derived field, a custom content type to use it, a list definition, and a list instance. Just follow the details in the article: http://www.sharepointconfig.com/2011/03/the-complete-guide-to-provisioning-sharepoint-2010-managed-metadata-fields/

SharePoint 2010 - Workflow randomly shows canceled

When a item is approved from the manager task the workflow updates a entry in a calendar list with the status approved. This workflow fails sometimes with the following error.
The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Access Denied
I have no idea why this happens. Here is my workflow code
Your images are not showing up so this is hard to diagnose, however it seems like you are trying to pass the wrong type of value to a variable, such as a string to a date/time.

Sharepoint Designer - Creating a simple Workflow, check status of another Workflow

I'm trying to create a simple workflow using the Sharepoint Designer. We already have one user-defined workflow, called Internal Approval. This creates a column with the same name.
Basically, my workflow should perform:
Conditions:
if Internal Approval equals Approved
and Status equals Draft //custom field I want to set, this works
The problem, after a quick debug, is that the Internal Approval does not equal to Approved nor contains it, Internal Approval equals 16.
The question: what is this number, and can I rely on it always being 16 for an approved workflow?
Or better, how can I check a if another workflow was approved?
May be this could help you Workflow Status
Reference Article from MSDN, just type case the above Enum to Integer you will get the values.
Also to filter based on the Workflow Status in the View. Refer

Creating a workflow task generates an "Invalid field name" error

I have a custom (code-based) workflow, deployed in WSS via features in a .wsp file. The workflow is configured with a custom task content type (ie, the Workflow element contains a TaskListContentTypeId attribute). This content type's declaration contains a FormUrls element pointing to a custom task edit page.
When the workflow attempts to create a task, the workflow throws this exception:
Invalid field name. {17ca3a22-fdfe-46eb-99b5-9646baed3f16
This is the ID of the FormURN site column. I thought FormURN is only used for InfoPath forms, not regular aspx forms...
Does anyone have any idea how to solve this, so I can create tasks in my workflow?
Are you using the CreateTaskWithContentTypeId activity in your workflow? If you are then you need to ensure that the content types have been added to the Workflow Tasks list. SharePoint will not add them automatically.
Oisin
It turns out that I was missing two things:
My custom content type neeeded to be
added to the workflow task list
I needed to add an empty FieldRefs element to my content type definition; without it, the content type wasn't inheriting any workflow task fields.

Resources