SharePoint 2013 Empty Item Workflows

Dears, When querying for List Item Workflows, it always returns 0 items although there is an active workflow associated with that item. The workflow is designed using SharePoint designer 2013 and using SharePoint 2013 workflow. The code below is a sample
of a code that is trying to get workflows.
foreach (SPWorkflow workflow in RequestItem.Workflows)
if (string.Compare(workflow.ParentAssociation.Name, SystemVariables.RFPWorkflowName, true) == 0)
SPWorkflowTaskCollection workFlowTasks = site.WorkflowManager.GetWorkflowTasks(RequestItem, workflow.InstanceId);
foreach (SPWorkflowTask wfTask in workFlowTasks)
if (wfTask.ID == TaskID)
int taskItemsCount = wfTask.ListItems.Count;
break;
break;
Khaled Moawad --- http://kholyos.blogspot.com

Also experiencing this same behavior. Did you ever find a solution to this?
Thanks.

Similar Messages

  • Workflow in SharePoint 2013: Update item in list

    I have a task list where anyone can post a suggestion for a blog. There is a string field for the status.
    I have a library where the author can upload the blog article when ready to send for review. Uploading the document triggers the workflow to start. This document is reviewed twice and when the author is satisfied it will go for translation and then for web
    publication.
    All of this is worked out in the workflow except for one thing: I would like to update the task list at each stage of the process to the current status. Since it can all be done programmatically, I don't need to use a "choice" field. The string
    field would be just fine. One of the things I saw in my research is that "choice" fields won't update.
    I have put a lookup field in the blog article library to correspond with the title in the task list to create a relationship.
    First of all, is it possible to do to update a task from a document library, or am I just spitting in the wind? If so, why doesn't it work?

    which specific field you want to update after task approval. Did you create a content type based on workflow task (SharePoint 2013) and associated that particular content type with your task list?
    I repeat my question - do you want to update task list after the task execution or just after assignment?
    If its just after assignment then I think its not possible OOB and if its after the execution of the task then its doable OOB since there are two variables set as task out i.e. task outcome and TaskID (guid of the current task list item) and from that TaskID
    you can lookup the task list item and update any field.

  • SharePoint 2013 document library workflow to send emails when document changes

    Hi All,
    Need a email alerts to setup when documents get change in a SharePoint 2013 document library.  Mail should go to all the members in a SharePoint Security group.
    Many Thanks 
    sudesh withanage

    Out of the box , You cannot set alerts for SharePoint group. You may try -
    1- Create a group in active directory, add users to the ADgroup. Add that ADgroup in Sharepoint and configure alert.
    2- You can set up a new user and change their email to that of a distribution list, and then assign the alerts to this user.
    3- You can create a custom workflow/action or event receiver that will send an email to a distibution list or programmatically traverse the SPGroup's members and send them the notification email, whenever an item is added or changed.
    4- You can try this , this was for WSS3 -
    http://advancedalert.codeplex.com/
    5- you can to use SharePoint Designer and create a workflow that send an email to SharePoint group.
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • SharePoint 2013 Discussion items "visibility" depending on permession for specific groups and users

    Hello,
    I have a blank site in SharePoint 2013 in which i activated `CommunityFeature` and i created a discussion board app which is displayed in a web part.
    Now, i want to be able to change the discussion visibility ... E.g. when i click on new discussion i want to have a people picker that allows me to choose people or groups that are allowed to see and reply for that discussion...
    How can this be made? can anyone help me please?

    Hi,
    The OOTB feature “Audience Targeting” on list item will be capable of your requirement.
    “List or library items can be targeted to appear only to people who are members of a particular group or audience”.
    More information about
    Audience Targeting:
    http://office.microsoft.com/en-001/sharepoint-server-help/target-content-to-specific-audiences-HA010169053.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • SharePoint 2013 State Machine Workflow Developped using Visual Studio 2013 Terminated

    Hi all,
    I developped a state machine workflow using Visual Studio 2013, and deplyed to SharePoint 2013, the workflow work fine for first task, and some times for second task.
    after that the workflow become terminated with below error:
    - System.Activities.Statements.WorkflowTerminatedException: The workflow instance exceeded the throttle of 10000 activities executed in a row and could not be unloaded because it was not persistable.
    I spent many days to solve this issue but witout any result...
    Please advice...

    Hi,
    According to your description, there seems an endless loop in your workflow which makes the workflow exceed the throttle.
    A suggestion is that you can create a new clean sample state machine workflow firstly, when it works without error, then adding other activities with custom logic
    gradually.
    By doing this, it would be easier to find out what might cause the error in this workflow.
    A demo about Create State machine Workflow In SharePoint 2013 for your reference:
    http://www.splessons.com/2013/12/create-state-machine-workflow-in-sharepoint-2013-using-visual-studio-2012/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Change text of ECB menu sharepoint 2013 e.g Workflow text to something else

    I would like to add a custom text instead of the Workflow text in the ECB menu. Any ideas on how i can achieve this?
    Thanks In Advance

    Hi,
    As Sergio suggests, you can try some code like this, it will change the text of an item in the ECB menu:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script>
    var itv;
    //specify the item in the ECB menu here
    var item = "Workflows";
    //replace the text with the string below
    var newItem = "wfs";
    _spBodyOnLoadFunctionNames.push("ready");
    function ready()
    itv = setInterval(fun, 100);
    function fun()
    var $t = $("ul.ms-core-menu-list li[text="+item+"]");
    $t.find("span.ms-core-menu-title").text(newItem);
    </script>
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to see/use Target Audience column in SharePoint Designer Workflow (SharePoint 2013 Online, Designer Workflow)

    Hello,
    I'm attempting to use use the Target Audiences field in a SPD 2013 workflow, in this case just attempting to log the value to history for testing purposes.  This is failing saying the column does not exist.
    I enabled Audience Targeting on the list then create a simple workflow to log the value to history when the item changes.
    I change an item and the workflow starts, but when it gets to any action looking at "Current Item:Target Audiences" it stops and says:
    HTTP BadRequest to <site url>/_api/web/lists(guid'XXXXXXXX')/Items(4)?%24select=ID%2CTarget_x0020_Audiences 
    The field or property 'Target_x0020_Audiences' does not exist. 
    But it does.  It is listed in the list setting and enabled for the content type.
    I ran the listed API through an API program and sure enough, Target Audience is not listed in the results object.
    I'm 99% sure I've enabled this and that the field is present and the workflow is valid.  I ran the same situation on two lists to ensure it wasn't a hiccup, same results.
    Is this a know issue?  I couldn't find anything obvious online saying you cannot see this field via workflow, most of what i found said this would work.
    Thanks an advance for any input.

    Thanks so much Lisa, for the clarification.
    I understand what you have explained, and have seen several similar explanations that have lead to my confusion.  Can you elaborate a bit, maybe for the sake of future information seekers?
    I understand that audiences can be defined using the rules operations in Central Admin, but it seems another standard function is to just directly assign existing SharePoint groups.  I think this is what you mean above, but this is also the point of
    my misunderstanding.
    In this particular setup I have only used existing SharePoint groups with no audiences defined in Central Admin.  List Item A has a target audience of SharePoint group X, just that simple of a setup.
    Assuming the above is valid, I would then like to see or alter the groups via SPD workflow.
    Based on the following posts, I was under the impression this may be possible (but obviously not fully clear and thus I posted this):
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/5eb984ba-55a3-4da7-a904-c34b2fece84c/how-do-i-set-the-target-audience-using-sharepoint-designer-workflow
    http://www.sharepoint-tips.com/2011/01/setting-target-audiences-with-code.html
    (sorry about lack of links, my account must still require verification)
    So in SPD, I set a simple action such as "Log Current Item:Target Audience to history" (note the I am able to select target audience in SPD like any other field with no errors).  At this point I am assuming everything is valid as SPD is treating
    the field like any other string field.  When executed the error in the above post comes up.
    So to confirm your explanation, this is not supported?  Even though the field is available for selection by design, it is not capable of use and known to produce errors in all cases of its use?  The first post above is 100% wrong and you cannot
    use SPD to set/view the target audience field?  The second post is also wrong as it seems to present the fields as available for alteration using string concatenation?
     If in fact the field is present by design, but also impossible to use by design, is this potentially a bug as the field is not supposed to be available if it will always produce the error when used with no error in SPD during compile?
    Thank you again for the reply and I hope we might be able to provide a rock solid answer to this for future seekers. 

  • SharePoint 2013 - SPD Custom Workflow keeps sending multiple emails for a single Task

    I have a workflow triggering on List item created only. There are multiple stages in the work flow and in each stage a single task is assigned to a group of people. Currently group is only having one user i.e. my own test user with a valid email address.
    Workflow was running fine for first 5 runs but now it keeps sending multiple emails for each task multiple times and runs very slow. I have only single workflow in development server with 24GB RAM.
    Enabling the Workflow log in Event viewer does not show any error or warnings. The only clue I see is WorkFlowManager Database table "DebugTrace" having multiple entries showing that WF is trying to send same email multiple times with failed attempts,
    but in reality emails are being delivered as well.
    http://server/site/_vti_bin/client.svc/sp.utilities.utility.SendEmail Retry sending email in xx.xx.xx Status: HTTPRetrying
    http://server/site/_vti_bin/client.svc/sp.utilities.utility.SendEmail Retry sending email in xx.xx.xx  Status: HTTPFailed
    I could not get the exact phrase as I don't have direct access to development machine at work.
    Any help or guidance will be highly appreciated.

    Yes, I have on-premise SP site, and here is the actual log I see in DebugTraces table.
    Message              Level     Name    Category
    Attempt 1 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' failed with response '<Exception.
    No Status Code>'.              2              HttpRequestFailed          Http
    Attempt 2 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' will be made in 00:00:06.            
    2              HttpRequestRetrying     Http
    Attempt 2 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' failed with response '<Exception.
    No Status Code>'.              2              HttpRequestFailed          Http
    Attempt 3 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' will be made in 00:00:07.            
    2              HttpRequestRetrying     Http
    Attempt 3 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' failed with response '<Exception.
    No Status Code>'.              2              HttpRequestFailed          Http
    Attempt 4 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' will be made in 00:00:09.            
    2              HttpRequestRetrying     Http
    Attempt 4 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' failed with response '<Exception.
    No Status Code>'.              2              HttpRequestFailed          Http
    Attempt 5 of the HTTP request to 'http://site/collection/_vti_bin/client.svc/sp.utilities.utility.SendEmail' will be made in 00:00:13.            
    2              HttpRequestRetrying     Http

  • Sharepoint 2010 Workflow successful: Sharepoint 2013 Workflow UNsuccessful:

    Observation 1 
    1. I created 2 workflows that write "completed" to the workflow history 
    a. 1 workflow uses sp2010 workflow manager 
    b. 1 workflow uses sp2013 workflow manager 
    2. sp2010 workflow works fine; it will start either manually or automatically (when a new item is created ) without issue; "completed' is written to the log as expected. Good. 
    3. sp2013 does not start automatically (when a new item is created ); when trying to start manually I get error message "Something went wrong. To try again, reload the page and then start the workflow." Which I do, but still fails.
    Bad. 
    4.On Workflows.aspx I can see the links to start the 2 workflows manually. 
    a. When I hover over the sp2010 workflow link I can see something that look like this: 
    http://playground/sites/falcontt/_layouts/15/IniWrkflIP.aspx?List={ae95de8e-508b-4aa6-b4b6-490288e35e9f}&ID=53&ItemGuid={697E4218-D889-4FB8-A27B-D188F5D93250}&TemplateID={199c3d86-89a8-4286-b285-37e2d2067b52}&Source=http%3A%2F%2Fplayground%2Fsites%2Ffalcontt%2FLists%2FTrouble%2520Tickets%2Fall%2520requests%2Easpx 
    b. But when I hover over the sp2013 workflow link I can see something that look like this: 
    javascript:StartWorkflow4('949cb889-9b46-4959-9673-842e60cc5a42', '53', '{697E4218-D889-4FB8-A27B-D188F5D93250}') 
    Should this link also look similar to the sp2010 workflow link? If so, do you have any idea why it is different? 
    Observation 2 
    In Sharepoint Designer 2013, when I goto Navigation -> Workflows and click on the 2010 workflow, I see a file listed under "Forms" that looks like this "sp2010 test workflow.xsn". By the way the name of the workflow happens
    to be "sp2010 test workflow". 
    But when I goto Navigation -> Workflows and click on the 2013 workflow, I see a NO file listed under "Forms". Should I see "sp2013 test workflow.xsn" listed there? If yes, can you think of why it is not listed there? 
    I saved the workflow debug logs from Event Viewer but won't share that info here unless necessary, to avoid making things look more complicated than they have to be. 
    Thanks for any comments suggestions, tips, questions, anything, etc. 
    Thanks and have a great weekend. 
    George 

    Hi George,
    First of all, I'd like to clarify that workflow manager is dedicated for SharePoint 2013 workflow platform. SharePoint 2010 workflow is integrated in SharePoint server, while 2013 workflow is based on a new platform named workflow manager server.
    In SharePoint 2013 designer, 2010 workflow has forms while 2013 workflow doesn't have forms.
    For this issue, I suspect there is something incorrect with workflow manager. From the error message "Something went wrong. To try again, reload the page and then start the workflow",  please flush the DNS cache via executing
    IPCONFIG /FLUSHDNS, and restart workflow manager related services such as below, then recreate 2013 workflow to test the issue:
    Service Bus Gateway
    Service Bus Message Broker
    http://blog.houratious.com/2014/05/sharepoint-2013-workflow-something-went.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Open Edit form directly when list item is clicked in Sharepoint 2013 list

    Hi,
    I have a list web part, wherein the user clicks the item it should open in the Edit form directly. various forum i checked was for SharePoint 2010, as we do not have design mode in SharePoint designer 2013, I am unable to do.. I know
    if I the change the form type from default page to edit page, it will work, but not sure about how to go ahead. Could anyone help me to achieve this please....

    Sunitha,
    You can do this with some jQuery and JavaScript.  Look at this post:
    http://brandonatkinson.blogspot.com/2013/11/open-sharepoint-2013-list-items.html
    Basically, add a Script Editor Web Part to the page and include this snippet:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script type="text/javascript">
    $(function() {
    // Change all display form links to edit form links
    $('.ms-vb a[href*="listform.aspx"]').each(function(){
    var link = $(this).attr('href');
    link = link.replace("PageType=4", "PageType=6");
    $(this).attr('href', link);
    </script>
    Brandon Atkinson
    Blog: http://brandonatkinson.blogspot.com

  • Install workflow manager on sharepoint 2013

    hi , I install work flow manager .but i could not see  workflow 2013  in sharepoint 2013 .why ?

    http://technet.microsoft.com/en-us/library/jj658588%28v=office.15%29
    There is service application\option in SharePoint 2013 where you can see workflow 2013.
    You can see workflow 2013 in designer which comes with Workflow manager 2013. Also you have to configure workflow manager 2013 as per below:
    http://www.harbar.net/articles/wfm2.aspx
    http://blog.cloudshare.com/2013/01/15/how-to-install-and-configure-workflow-infrastructure-in-sharepoint-2013/
    http://lennytech.wordpress.com/2013/06/02/configuring-sharepoint-2013-to-use-workflow-manager-1-0/

  • How to open and read Excel Sheet from SharePoint 2013 Document Library using C# Visual Studio 2012

    Hi,
    To achieve these are the steps that I had followed :
    1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
    2. Add Documnet Library link to Trusted Connection Proivder
    3. Open Visual Studio as Run as Administrator
    4.Create an SharePoint 2013 Empty Project.
    5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
    6.Service added successfully
    7.Create a class file and add the Service Reference namespace
    There is no such class as ExcelService to call. 
    Please let me know if somebody knows how to open the Excel file into C#(2012)  either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
    Requirement is :
    Need to read the excel sheet  from Document Library and transfer all data into DataTable.
    Please help asap. 

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Paste doesn't work in IE8+Sharepoint 2013

    I try to edit SharePoint 2013 list item in IE8 using Ctrl+V. But nothing happened, copied text wasn't pasted, only cursor stuck. It does not happen every time, but very often.
    How can I fix this?

    Hi,
    Does this issue only occur when you copy/paste in sharepoint 2013 in IE8? In other websites or word, excel, the copy/paste function is just working fine, right?
    Do you have any clipboard management utilities installed, you may have one that is malfunctioning or compatible, if so, uninstall. (Or if this issue occurred after installing some new program or ActiveX control, uninstall for a test)
    Clear the browser history, cookies, and caches in IE
    Try use no add-ons mode, click Accessories, click System Tools, and then click
    Internet Explorer (No Add-ons).
    Perform a security scan, in case sometimes a virus or malcious software can cause this issue.
    Yolanda Zhu
    TechNet Community Support

  • Sharepoint 2013 in cloud connect to in house database

    I am in a company that recently implemented office 365 so that we can use sharepoint 2013 in the cloud. I am trying to determine how to setup a web service that will be setup to work with SharePoint 2013 in the cloud.
    The issue is the databases that the web service will call are on premises. However workflows are in the cloud on sharepoint 2013. I am assuming that there will be firewall and/or security issues that will need to be dealt with.
    I am thinking of creating the web service by using the following link as a good reference point:
    link is called: 'Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013'
    link is:
    http://msdn.microsoft.com/en-us/library/office/dn567558(v=office.15)
    Thus I wondering if you can tell me or point me to a url that will show me how to make the following work:
    a. Have sharepoint 2013 in cloud workflow call a web service,
    b. Have the web service obtain the data from in houses database ?

    Hi,
    According to your post, my understanding is that you want to use web service in Sharepoint Online.
    You can call a web service in cloud workflow.
    You can obtain the data from in houses database using web service.
    For more information, you can refer to:
    Call Web Services From Workflows on SharePoint Online
    SharePoint Online and External Data using JSONP
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • SharePoint Designer 2013 (2010 Platform Workflow) - How can I create a new list item with a SPECIFIC content type?

    In SharePoint 2010 I created workflows that used the 'Create list Item' Action, which then set the Content Type ID (so I could create documents of various types in a document library). 
    We just switched to the SharePoint 2013 platform, and now the drop down for Content Type ID is blank in all of the workflows that are still using the SharePoint 2010 platform.  Is there any way to create a list item with specific content
    type?  Even if I could just input a string into that field instead of using this blank drop-down.  Please help! 

    Hi Sarah,
    According to your description, my understanding is that you cannot create a new list item with a specific content type using SharePoint 2010 Platform Workflow.
    I tested the same scenario in my environment, and the Create List Item worked fine with the specific content type.
    How did you create the content type?
    Please check if the content type is added to the list/library the workflow associated with.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Blocking of Goods Receipt

    Hi, I have two questions here ..... 1. I have a scenario where in I have blocked a vendor in XK05 for both purchasing block and Posting block. Now for this vendor I am able to post a GR  for the Open POs that were created for this vendor before putti

  • How to create new authorisation object for Transactions?

    Hi, How to create new authorisaton object and how to assign that object on a transaction code? Case -> The transaction code VL01N have the object called V_LIKP_VST under Class "LE_V" that have two auth. fields. one is 'Activity' and other one is "Shi

  • IPhoto '09 "is saving critical information of your mediathek"

    When I close iPhoto, the a.m. dialogue-box appears - with the option "later" Even when the blue graphic shows full, the box will not disappear. I have more than 12.000 photos in iPhoto. Can it be that this is just too much? And could this be related

  • Error 8 In Update,while doing transport from sandbox to Dev.

    Hi All,   I am trying to transport some 100 queries from sandbox to development. I made a 10 queries in a single request and transported it from sandbox to development.First 6 transports  went fine.(means 60 queries with out any issues).next 4 transp

  • Calling a jpeg compressio​n dll

    I use webcam images in a LabVIEW based equivalent of NetMeeting to allow communication between people in our laboratory. I currently compress my images by calling an LZW dll, but would prefer to use JPEG as lossy compression creates smaller data pack