SharePoint Experts Blog

Posts Tagged Workflow Actions Pack

How to set Item Level Permissions via SharePoint Designer (break role inheritance and assign permissions in one action)

In this short tip, I will show you a simple case with approval scenario, an example I’m a SharePoint Developer and I have to implement a document approval scenario.

But there are some nuances in the case. When a user sends a document to approve, the workflow should reset permissions for everyone except a user who has approval task now.

In this case, we guarantee that no one else could change the document after the process was started.

 Approval Use Case

Read more…

Posted in: Products, Workflow Actions Pack

Query multiple lists across multiple sites and group results using SharePoint 2013 and Office 365 workflow

In this blog post I want to continue one of my previous articles Dynamic text and HTML templates using workflows for SharePoint 2013 or Office 365. Just in a few words to remind that in last article we have created a workflow that collects data from one list and makes two types of reports: individual and summary. These reports are delivered to user and administrator by email.

Now I will describe our new workflow action Get Items by Query (Many Lists). As you can see in documentation, it is an analogue of SPSiteDataQuery command which is exist in Server Object Model (SSOM) but it is not available in Client (CSOM). Moreover, it has additional features like grouping and sorting, which I will cover in this article.

Let’s imagine that we have something like Document Management System (DMS) based on SharePoint Online. Each our department has own site (HR, Sales, Finance, IT, etc…) and each department on own site has own document libraries structure specific to them. As in the last case, we want to build checked-out documents report, but now it should show data from all document libraries and from all sites.

In this article I will described how to query multiple lists across SharePoint sites. You can group results by specific field and then iterate through groups.

As a prof of concept I will create two workflows which send reports about checked out documents across multiple sites to individual users as well as summary report to administrator.

This is case where Get Items by Query (Many Lists) will be very useful, because it allows us to run one CAML query to many lists and as result, it will be single Dictionary object. 

Get Items by Query from many lists Read more…

Posted in: Workflow Actions Pack

How to invite external users using SharePoint Designer Workflows in Office 365 (Online)

In this article, I want to review a part of Customer Collaboration System, which can be used to share documents with clients and cooperative work on common projects. This ‘proof of concept’ was build using SharePoint Online and Plumsail Workflow Actions Pack.

Architecture description

Core of our system is a simple document library which contains different folders, each folder matches to one of clients and contains common documents (and other folders) which will be available for a client. The permission restriction will be carried out with help of SharePoint Groups. For each of our clients will be created own SharePoint group. Each folder in the document library will be matched to SharePoint group by name.

All internal logic concluded in two workflows, which start on “Item Creation” event. Additionally we will have two custom lists: “Companies” and “Contacts”. We will use these lists as dictionaries to store information about clients. “Contacts” list contains user email and lookup to “Companies” List.

The common architecture scheme I have provided below:

Invite External Users SharePoint Online Read more…

Posted in: Products, Workflow Actions Pack

How to Start SharePoint 2013 Workflows on Selected Items

This blog post appeared as an email response to one of our clients, he described very common use case where you have two libraries of documents, the first library where the users works with draft documents and the other library which is stored the final versions of documents. In this case, users want to be able to select finished documents and move it in one click.
Oblivious solution for this is to use a workflow that will move documents to the final document library. But there is one question how we can start the workflow on selected list items? When I was thinking about the answer to that question – I realized that is not as trivial as it seems, because list level workflow can be started only on singl document. How to start multiple workflows on selected documents? In the article, I will describe how you can implement such solution.

I divided this article into three main parts:

  • Get selected items via JavaScript;
  • Start SharePoint 2013 workflow from JavaScript;
  • Add custom button to the list ribbon

Before we start, I want to show what we will get in result. On the figure below you can see the custom button on the ribbon, which will launch a workflows on selected documents.

Read more…

Posted in: Products, Workflow Actions Pack

Deploy custom SharePoint 2013 workflows with site template

It is common scenario when you did some customizations, saved site as template and want to reuse it in SharePoint 2013. Such site templates can include workflows with custom workflow actions. Unfortunately if you save site with custom workflow actions as template and then try to create new site you can receive such annoying error:

Microsoft.Workflow.Client.ActivityNotFoundException:The activity named 'WorkflowXaml_988fe3c3_dc3e_47a9_8ff3_c912c82eb56d'from scope '/spo/216722f1-1dc0-4c6d-aafd-86b12ef60a14/1f87e1ae-da77-44d4-92d1-502507b5f2d4/34ceaf02-5217-46be-a307-e09dd93da230' was not found. HTTP headers received from the server -ActivityId:224e672a-4e00-44ed-8b55-894a059608c2.NodeId:.Scope:.ClientActivityId: f6cadd9c-c011-1000-aa42-85eedd28fc19.--->System.Net.WebException:The remote server returned an error

The reason of such behavior is related to incorrect processing of template by SharePoint 2013. I described it in detail in other my blog article. But this article is not about reasons of such behavior. We created small utility program TemplatePackageFix which fixes site templates with custom workflow actions and allows to reuse them as many times as you need.

We decided to implement such utility because some of our customers had questions about correct site template provisioning. Especially when custom site template included workflow actions from our product Workflow Actions PackRead more…

Posted in: Products, Workflow Actions Pack

Page 1 of 2 12