Sharepoint workflow assignment email doesn't preserve lookups - sharepoint

I am using Sharepoint workflow 2013 and my issue is with assignment email body in the action "Start a task process".
Whenever I add lookups using "Add or Change Lookup" button, it is changed to this "{#index of the lookup}", and if i added just one lookup i get the following error.
Using the special characters '[%%]' or '[%xxx%] in any string, or using the special character '{' in a string that also contains a workflow lookup, may corrupt the string and cause an unexpected result when the workflow runs.
I follow these steps:
From the drop down on the right of the "start a task process" action, I choose properties.
I open "AssignmentEmailBody" string builder.
Assignment Email Option
I add my lookups to be used the email.
LookUp Added
I press ok for the string builder window and ok for the properties window.
If I opened the properties again I find the lookups replaced.
Replaced lookup
I want to preserve the lookups.
Any help would appreciated.

Related

Kentico 11 - How to make the search Dialog inside an Uni Selector search for other than name

I have a situation with a custom user interface where I need to use an UniSelector-type component but the displayed names of the objects would be composite, e.g: 'ClientPrefix + " - " + ClientName'.
This would be trivial to do by creating a macro on the DisplayName property of the selector, however, if the client uses the search dialog he's not able to search by the Prefix part of the objects.
I know that an UniSelector component uses the "selectall" query so I tried using a view there to bring a new "ClientCodeName" column with the final name and it works properly in place of the macro above, however the search still ignores it and searches by name only.
There doesn't seem to exist a property for this on Kentico. Is there a way to modify this behaviour? I
would be fine creating a custom unigrid implementation if it would come to this, as long as I can still keep the solution as a Custom module interface.
If client searches for 1401, nothing comes up
There is a field under the advanced options of the uni selector called "Additional columns". Add the columns to this that you want to have it also search through.

How to perform Looping Through List Items in SharePoint 2013 Designer Workflows?

I am new to SharePoint. I'm creating a workflow in SharePoint 2013 in which I want to iterate a List using a loop.
How to perform looping through list items in SharePoint 2013 Designer Workflows?
I'm not aware that there's any out-of-box way to get a workflow to "loop through" all entries in a list, but you can try to make two workflows bouncing back to each other until all entries are updated, here is the detailed steps,
assuming that the list that we are working on is named list_work, in this list, create a column named e.g. cargo
define another list, name it e.g. list_control,
define a column named e.g. listID,
define a column named e.g. cargo,
create one entry in the list, set the cargo to a value.
define a workflow, name it e.g. workflow_list_control, which is triggered every time the entry in list_control is updated, and in this workflow,
search for an entry in the list_work where the list_work.cargo doesn't equal list_control.cargo
if any entry is found, update the entry of list_work and set the list_work.cargo with list_control.cargo, in order to trigger the workflow_list_work (see #4 below)
if no entry is found, stop this workflow.
define the workflow that needs to be run on the list_work, e.g. named workflow_list_work, make it's triggered every time the entry in list_work is updated, and in this workflow, make sure it updates the only entry in the list_control with the ID of the entry from list_work that is being modified, only to trigger the workflow_list_control. In this step, try to put a workflow step to wait and verify the ID is properly updated, in order to allow enough time for the previous workflow_list_control properly finishes.
Every time if a looping-through is necessary, modify the entry in list_control with a different value in the cargo field.
Also refer to calculated-column-to-retrieve-total-number-of-id
You can do this in SharePoint 2013 (ONLY!) using the new "HTTP web service". The "trick" is to
Create a task that will call the HTTP Web Service and call ".../client.svc/web/lists/getbyid(<List Guid>)/items"
Return the (JSON) results in a (new in 2013 also!) "dictionary" variable
Use the "Get an Item from a Dictionary" action
"item by name or path" and enter "d/results"
select the "dictionary" variable (that you captured the results in)
output to another dictionary variable (call it "data")
Then get the count (for the loop) by using the action "Count Items in data" and output that to a variable (totalItems) to get the number of records
For the "loop" you will use the "Loop with condition"; use a variable called "index" and set it to 0. "Loop with condition" until "index < totalItems"
In the body of the loop:
"Get an item from a dictionary" use "item by name or path"
using string builder "d/results/(<index>)/".
The "Column Name to Retrieve" will be whatever column(s) you want to evaluate (like maybe "DueDate").
Note: You will have to use the "Static Name" of the column, which can be found by going to the Task List Settings and clicking the name of the column, then in the URL find the "Field=<Name>" portion.. It is that "<Name>" that you will use.
I know this is very CRUDE maybe even bordering on "useless" for alot of users, but I felt I should at least attempt a quick reply. When I have more time, I will try to edit this and format my reply better. Although, I found this because of a similar need and since I figured out a way to accomplish what I was needing, I felt compelled to at least share it the best I could, in the limited time I had available. ;) So, maybe SOMEONE will find what I have attempted to describe, "useful". :)

Sharepoint 2010 Workflow: add task with List content

I'm managing a Sharepoint list, which is holding all our changes made in our last software iteration. Among the fields are a few pertaining to the testing process, for example a 'Testing Result' dropdown (possible values Ok/Not Ok/Todo).
I've successfully set up a Sharepoint Workflow, which assigns a "Please test this" Task to the developers, when someone sets this 'Testing result' to 'Not Ok'. This works nicely, but I would like to add some fields from the List to the Task title, to let the developers know which item they actually need to re-test.
Is this possible? I'm using Sharepoint Designer for this (it's a Sharepoint 2010 workflow)
This is possible if you create a variable and build up a string and then assign it to the Title.
you string can be made up of static text, other workflow values and fields from the list you are working or from somewhere else in the site.
Found this myself, you can add all necessary fields if you use the action 'Custom Task Process' instead of simply assigning a task.

Change the name when Customizing CRM 2011

I customize the campaign form and i face the some problem
1.How to customize the name "GENERAL".i need the name instead of GENERAL .Where to change?or which property should i change?
2.cant delete Lock symbol fields if we try , its saying "It is allowed only for business units".How to unlock and How to delete this?
As Guido suggests, double you can edit the name of the tab by opening up the form in the form editor, double clicking on the tab, and changing the label.
As far as the locked field, you'll have to mark the field as not required, in the entity customization, publish your changes, then you can delete the field from the form.
The label for any tab can be changed by the form editor, if you want a dynamic value you can set using supported customization as this example:
var firstTab = Xrm.Page.ui.tabs.get(0);
firstTab.setLabel("new tab name");
If a field is locked, it means that is business required (in your case is the name of the campaign that must be filled), you can always hide the field and pre-fill the value using javascript code inside onload, onchange or onsave events.
Perhaps someone else can suggest a better (i.e. supported) solution but until then - why not find out the id of those elements and edit them directly from JS in onload? Let me repeat, though, that such an operation is unsupported.

SPWorkflowTaskProperties.ExtendedProperties aren’t populating the fields in my task

I am attempting to pass information from a task created within a workflow to its corresponding task form. Prior to the CreateTask activity, I create an SPWorkflowTaskProperties and fill it with the usual info (title, assigned-to, etc). I also add some elements to the ExtendedProperties property. However, those custom properties never make it into the Task.
I've tried setting the property key to:
the Guid of one of my task' content
type's fields;
the internal name of
one of my task' content type's
fields;
an unrelated name (in the
hopes of getting the info into the
task's properties instead of its
fields).
Nothing works. The task, once created, contains only the built-in field values I have set. None of values I explicitly added to the extended properties show up.
The (simplified) sequence of my activities is as follows:
PrepareTask. This is a custom
activity that contains the
SPWorkflowTaskProperties
CreateTask. The task properties are bound to the one in the PrepareTask activity.
OnTaskCreated. The task properties are bound to the one in the PrepareTask activity.
While (task not complete)
OnTaskChanged
I am using WSS 3.0 SP1 and an ASPX (NOT InfoPath) task form.
I still don't know why my original solution didn't work. But I have found a workaround. My sequence of activities is now:
CreateTask
OnTaskCreated
CopyTaskItems. This is a custom
activity that puts values into my
custom task's fields, then updates
the task.
While (task not complete)
OnTaskChanged
So I have to create the task, then immediately poke values into it and update.
I hope this will help some future reader of this question.
You should be using a ItemMetadata.xml document as a secondary datasource that contains the definition of the fields that you want to pass to your task form. Something like:
<z:row xmlns:z="#RowsetSchema"
ows_Instructions=""
ows_Body=""
ows_Comments=""
ows_ApprovalStatus=""
/>
The File name is important btw.
Notice the ows_ (as it used the webservices all fields in the list will be prefixed with ows.)
Then in you infopath form, set the default value of each control you want to display this information in. Hit the fx button and insert a field or group from the secondary datasource.
A good resource: http://weblog.vb-tech.com/nick/archive/2007/02/25/2207.aspx

Resources