How to use LookupSPGroupMembers in Workflow Custom Activity (SharePoint) - workflow

I am creating a custom workflow in sharepoint designer 2013 but i have hit a snag where i cant work out a way to check to see if a user belongs to a specific user group.
This has led me to create a custom activity in Visual Studio 2012. There is a built in activity called LookupSPGroupMembers but i can for the life of me work out how to use the output.
The output is of type DyanamicValue, but I cant workout how to iterate through the value to retrieve the users.
HELP!

I found a way, this is complex to explain here, so please check in:
http://raquelalineblog.wordpress.com/2013/05/20/sharepoint-2013-lookupspgroupmembers-workflow-activity/
The result of LookupSPGroupMembers is an array or list of DynamicValues, you have to create the logic to iterate through this list and get the values of each item.

Related

CRM365 On Prem - Document Templates: how to hook the select event in the form menu

The CRM365 Form displays a convenient document template dropdown button where a number of actions could be initiated. Additionally, it displays the list of already existing document templates. The user can select one template in the list and it is downloaded locally by your browser. So far all good.
Our goal is actually to select the template, retrieve it, and create it in a Document Management repository. We have a working solution for this but it involves too many pieces and steps so we are looking for some better ideas.
Ideally we are looking for a solution where we can:
"intercept" the click on the template item and run a JavaScript function
If we find a solution to this, the rest would be just calling our custom workflow to do the rest of the job.
So, is there any way to hook that "select/click" event from the form menu?
Thank you very much for your help and advice.

Retrieving all the possible options in a drop-down menu (when creating a work item) through the Azure DevOps API

I'm in the process of recreating the Work Item creation UI in my web app. The UI includes a lot of drop down menus. My choice right now is either to hardcode all of the options available, or retrieve them and dynamically populate. I would like to populate them dynamically, but that would require me to retrieve the possible options for each drop down menu. Is there a way to retrieve these through the API?
There's no direct rest api for this. If you want to retrieve the possible WorkItem types in current project, you should 1.first get the processID of current project and then 2.list the WorkItem types in specific process.
If you're using rest api like your tags above: You can consider using Processes-List to get the processID and List Work Items Types to get the available WorkItem types in one project. We can't do that directly in one api, no matter rest api or client api.
Just to follow up on this:
This document answers the question:
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20item%20types%20field/list?view=azure-devops-rest-5.1
We can retrieve the allowed values for our field through the API query GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields?$expand={$expand}&api-version=5.1
My issue now is that the allowed values for one of my drop-down menu depends on the value of another. For instance, if I selected X in one of my drop down menus, the allowed values for my other drop down menu changes dynamically. I'm not sure how to handle this using the API.

Accessing 'Details' component of ADF activity run instead of 'Output'

ADFv2 seems to be allowing accessing Output of an activity using #('activityname').output but in the monitor we also see a 'Details' component for certain activity types (e.g. HDInsightHive, SQL etc), so is there any way we can access it? It contains very valuable information and it would be great if there is a way to access it somehow. The ADF drop down (adding dynamic values) obviously doesn't show it. This internally available information if exposed via UI would be a great plus.
The following screenshot shows how the detail window appears, basically one has to click on this yellow highlighted icon:-
Now maybe i know your concern.You just wonder whether information could be accessed in the Details window. For example,my test copy activity:
Actually,based on my observation, the information listed in above window are exactly information in the error output.No more additional monitor information,just more readable and clear.
Besides,we can't find any more object of Activity Run Response from REST API.
So,if you are interested in the details info,please refer the output object.

How to access query from query results toolbar menu VSTS extension?

I am trying to write a VSTS Extension which allows me to clone a set of work items including links to a different area path.
To do this I have created an extension that uses the "ms.vss-work-web.work-item-query-results-toolbar-menu" contribution to create a toolbar menu item in the work item query results.
Ideally I would like to know the set of selected work items from the query to perform my clone on, but from what I have read this is not possible. I can live with running the clone on the whole query set, but I have not been able to figure out how to know what query was run from my extension.
How can you access the parent of the extension to know which query was run? I should be fine with running the TFS code to get the query results and perform the clone operation once I have that information.
The documentation for the client APIs is lacking, and the "hello world" examples they always provide do nothing but show the basics of the creation of the toolbar item and not any integration. I have checked through the Core client VSS SDK and could not find any object that contained the parent query.
I am also not able to access the parent URL to get the query from that as the extension runs in an IFRAME and that would be cross site scripting.
I appreciate any help with this.
Well I figured it out. You have to use the actionContext from the callback that gets invoked when your extension is invoked. I haven't found a reference for the actionContext, but by inspecting it in the browser, for the query toolbar menu item you get properties for the query, queryText and workItemIds.
This documentation has an example for the team information:
https://learn.microsoft.com/en-us/azure/devops/extend/develop/web-navigation?view=azure-devops

Use Followed work Item in a new Query TFS 2017

I want to create a query with my followed works items in TFS 2017, but I didn't find the field name for the followed state.
I want to create that query in order to add a new widget in home dashboard.
Is it possible to make a query with your followed items in TFS2017?
No, there isn’t the feature to create a query with followed work items in TFS or VSTS and pin to dashboard. You just can check followed work items from Work>Queries.
I submit a user voice here (Query for followed workitem and pin to dashboard), you can vote it.
You can achieve this scenario by creating a custom Followed work items query (System.ID In #Follows) and saving it to Shared Queries. Then, simply pin the query to your dashboard as a Query Results Widget and anyone who views it will see their followed work items (similarly you can pin an Assigned to me query using the #me macro and users will see items assigned to them).
The #Follows macro has been around in VSTS for awhile and was introduced in TFS 2017. Check out our documentation on queries macros for more information.
As proposed by Lauren, in TFS 2017, you can build an ad-hoc query "ID In #follows" (Field=ID / Operator=In / Value=#follows). The results will be similar to the Default Query "Followed work items" under Work>Queries.
However, I was never able to save this query: trying to save always got me an error "TF212023: You cannot compare fields with different data types in the WHERE clause of a work item query. The error is caused by «[System.Id] in (#follows)»."
What I found out is, that the query works well in the web interface, but cannot be run nor created or edited in Visual Studio.
I did not even find a way to "follow" a workitem in VS, this seems to be available only in the web interface as well.