Workflow for list item cancels

Hello!
I create item in PWA list via timer procedure (c#).
I have a workflow configured in SPD on item creation.
In timer code I open a web from definet user, so item in list creates without any problem (author - this definite user), but workflow stops immediately with error:
RequestorId: 47da81b9-1361-8e8e-2f05-c8376aa8939c. Details: System.ApplicationException: HTTP 401 {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating the request.\";category=\"invalid_client\""],"SPRequestGuid":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"request-id":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["29"],"SPIisLatency":["1"],"Cache-Control":["private"],"WWW-Authenticate":["Bearer
realm=\"2185ffaf-5b35-41d5-89ac-85ba7fd54a3a\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000005-0000-0000-c000-000000000000@*,[email protected]7fd54a3a\"","NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Date":["Fri, 12 Sep 2014 08:01:33 GMT"]} {"error_description":"The server was unable to process the request due to an ...
When I run code with elevated privileges, workflow runs without error, but from system account (it looks like this, because workflow can't create Project from item and it creates tasks as Workflow, not as "Workflow from user").
User profiles servises are running, I can find profile for user in central admin and c I can run full sync.
I also have restarted IIS for1000s times...
Help me please, how can I run workflow from specific user (I gave him even app admin permissions, but it still doesn't work)?
From LOGS:
The set of claims could not be mapped to a single user identity. Exception 3001002...
The registered mappered failed to resolve to one identity claim...
STS Call Claims Saml: Problem getting output claims identity...

Hello!
I have found solution.
I have study dozen forums and sites about SP and this one
http://stackoverflow.com/questions/6382583/use-credentials-to-interact-with-the-client-object-model-of-sharepoint gave me an idea.
I had to rewrite my code. I set 
using (ClientContext context = new ClientContext("http://yourserver/")) {
context.Credentials = new NetworkCredential("user", "password", "domain");//here my code for list item creation}
instead of 
SPSite spsite = new SPSite(siteUrl, spusertoken);
SPWeb web = spsite.OpenWeb();
// and so on
So, now SP has no problem with fiding initiator profile and workflows starts correctly automatically after an item was created.
Maybe this solution could save somebody's day.
Kate.

Similar Messages

  • How to again add workflow to workflow completed list item?

    Hi All,
    How to again add workflow to workflow completed list item?Thanks!

    Hi,
    According to your description,my understanding is you want to add a new workflow to the completed list item.
    a) If yes, then you need to follow the same process attaching the workflow to the list/library and while deploying the workflow you should  select  the option "Allow this workflow to be manually started.......".
    Go to the workflow completed list item  and start the workflow which was created newly in the above step.
    b) If your query is want to restart the same workflow for completed list item then,
    You need to go to the workflow completed list item-->workflows-->start/click on  the workflow again.
    To do this, you might have selected the option "Allow this workflow to be manually started......." while attaching the workflow to the list.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ******************************************************************************************
    s p kumar

  • FRM-30351: No list elements defined for list item.

    Hello!
    i have a list_item with name NOMBRE and in a NEW_FORM_INSTANCE trigger i have the following pl/sql block to populate it:
    declare
         grp_producto recordgroup := find_group('RECORD_PRODUCTO');
         lst_item item := find_item('PRODUCTO.NOMBRE');
         status number;
    begin
         status := populate_group(grp_producto);
         clear_list(lst_item);
         populate_list(lst_item,grp_producto);
    end;
    when i run the form, this message appear
    FRM-30351: No list elements defined for list item.
    List NOMBRE
    and the list appear without elements
    ...can somebody explain me the solution or if i have to do another thing to populate the list?
    Thanks

    Hi Duncan!
    i rewrote the manually code and agregate the clear_list function that i think you refer with "Make sure that the block is empty before you do this". This work the first time but in the next time a change that i do in the database isn't reflected in the list, i think that my cursor mantain the old information, well, can you indicate me some way to clear the cursor or something similar? or explain me another solution?
    thanks so much!
    declare
    nombre_producto soportebwv2.producto.nombre%type;
    lst_item item;
    i number:=1;
    CURSOR cur IS
    select nombre
    from soportebwv2.producto;
    begin
    lst_item:= find_item('PRODUCTO.NOMBRE');
    clear_list(lst_item);
    open cur;
    loop
    fetch cur into nombre_producto;
    exit when cur%NOTFOUND;
    add_list_element(lst_item, i, nombre_producto, nombre_producto);
    i:=i+1;
    end loop;
    close cur;
    end;

  • No list elements defined for list item.

    hi master
    when i use list item and run then give this error
    FRM-30351: No list elements defined for list item.
    List PRODUCT_NO
    Created form file MODULE1.fmx

    Try posting your question to Forms

  • Workflow for Requisition item Release

    Hi All,
    I need to create a workflow for Requisition item Release but I wish to receive one  work item for the whole requisition and not for each item
    and the method of the task will be collective release (leads to me55) so that the user can choose which item to release. Is that possible?
    Thanks and Regards,
    Inbal

    Hi All,
    I think i found the answer but i need help to do it.
    Every time a work item is created, the system needs to check if there is another work item with the same Requisition No. and same release code in status=ready.
    If not, it will send the work item.
    result:
    The first work item (first line in Requisition) will be sent, and as for the others (other lines in Requisition), as long as there is no work item with the same Requisition No. and same release code in status 'ready' the system will send it.
    Anybody can help me?

  • Error when running workflow form list item - workflow manager SharePoint 2013

    I am getting the following error in the workflow services log when I tried to run a SPD 2013 workflow from as list item. The workflow page comes up with an "An unexpected error has occurred"
    page when opened:
    Error processing management request. Method: GET, RequestUri: http://servername:12291/$Workflows/$Instances?$skip=0&$top=100&monitoringParameter=1f51aa43-2f1c-4fc5-a86d-f638ca57c00d, Error: System.Data.SqlClient.SqlException (0x80131904): The procedure "GetInstances" has no parameter named "@OtherWorkflowStatus".
    at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.Workflow.Gateway.HttpAsyncResult.End[TAsyncResult](IAsyncResult result)
    at Microsoft.Workflow.Gateway.WorkflowServiceGateway.<>c__DisplayClass9d.<EndGetInstances>b__9c()
    at Microsoft.Workflow.Gateway.WorkflowServiceGateway.ExceptionFilter[T](Func`1 body)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
    ClientConnectionId:d2039360-b352-4d81-9bb7-b647e2938d06
    Can't find anything on google.
    Edit: Ok, when I look at the error, it is saying the the "GetInstances" stored procedure in the WFInstanceManagementDB database does not have a parameter named "@OtherWorkflowStatus".
    For laughs, I added the parameter (which wasn't in there). Now I get the error:
    Procedure or function 'GetInstances' expects parameter '@OtherWorkflowStatus', which was not supplied
    It seems like there is something not right about my installation. Previously, I couldn't get the workflow backend service to run because there were config values missing from the workflow manager database. At the time I tried to uninstall/reinstall
    WFM to no avail. I eventually had to manually add the values to get it to work. Something is not right about the WFM install/config process.

    Here is what I had to do to get it working:
    Leave the WFM (Workflow Manager) farm using the WFM config tool
    Uninstall WFM, Service Bus, and the CU's from control panel
    Uninstall Workflow Manager Client if it exists in the control panel, it didn't in mine
    Delete the following databases in SQL Server:
    SbGatewayDatabase
    SbManagementDB
    SBMessageContainer01
    WFInstanceManagementDB
    WFManagementDB
    WFResourceManagementDB
    Delete the workflow proxy service in Central Admin (important)
    Application Management > Manage Service Applications
    Highlight (select) the Workflow Service Application Proxy service (don’t click the hyperlink)
    Select “Delete” from the ribbon.
    Restart the server
    Reinstall
    Enable the workflow proxy service in CA for the web app, the 2013 workflow option will not show up in SPD unless you do this.
    Application Management > Manage Web Applications
    Select your web app
    Select “Service Connections” from the ribbon
    Check the Workflow Service Application Proxy item and click “OK”

  • SPD 2013 Workflow - Create list item with people picker in other site collection

    Hi all,
    I read a lot of blogs and forum posts the last couple of days, but I seem to be stuck as to why my workflow is not working as expected - thus, I thought I would ask the experts :-)
    Setup:
    2 lists in 2 different site collections
    http://svr-url/servicedesk/tickets
    http://svr-url/projects/requests
    SharePoint 2013 on Prem
    I try to create a SPD 2013 workflow that creates a new item in list "requests" once a certain trigger is set in list "tickets". One of the fields I need to copy is the requestor = People picker field.
    I did a web service call with a REST call to create a list item. All works well as long as I just stick to Title and other text fields, but filling in the "Requestor" fails with "Bad request".
    I learned I need to use the "RequestorID" field and in a blog I read I need to put in the user id as Int32. So I set the parameters in the dictionary to integer. Still I get "bad request".
    Another issue: as I have lists from 2 site collections, the user id differs for the same user.
    /servicedesk: ID = 9
    /projects: ID = 22
    Additionally, the possibility exists that the user I try to set is not already existent in the /projects user information list.
    How can I deal with that?

    check this
    http://community.office365.com/en-us/f/154/t/127887.aspx

  • Workflow for Changing Item Level Permission in SharePoint 2013 (Office365)

    I am using OOTB Tasks List in SharePoint 2013 (O365). Now my scenario is like this:
    I have two user groups: 1.Sales Managers 2. Sales Executives
    Sales Managers can create & assign task to Executive.  I want something like Sales Managers Can view all tasks (Which is by default view of tasks list i.e. perfact) but Executives can see only their tasks assigned to them. How can I achive this?
    Can I use WorkFlow for this to Change item level permission or to assign permission to assigned to user? or JS
    Can anyone have proper solution? thanks

    1. make 2 SharePoint group 1>Sales Managers 2>Sales Executives
    2. Show 2 WP of same task list in same page.
    3. Use Audience Target for Sales Managers Sharepoint group in first Webpart property. (All
    Iten view)
    4. Show "My Task" view (assign to =[Me]) Bottom WP for same task list and use Audience Target for Sales Executives. Or if you want it to see
    Sales Managers as well, the dont use any Audience Target.
    Bottom line - SharePoint group use in Audience Target will do the trick. OOTB
    Regards Sudip Misra [email protected] +1-412-237-5435 Pittsburgh, PA

  • How to override Approve button for list item?

    Hello,
    Is there a way how to override the method that runs after list item is approved / rejected? I know there is a way for the Save button but I can't find how to do it for the Approve button.
    I have a list with approval and workflow. Then I have a page that displays the items from the list in my webpart in a calendar/grid way. The items in the webopart have links leading to the display form with the item ID and Source parameters. Source parameter
    leads back to this page. The background color of the item in the webpart is decided by the approval state of the item.
    When user approves the item and the item form closes user is then sent to the page with the webpart (via the Source parameter) but the workflow takes couple of seconds more to process the aproval so the color is not changed when the webpart renders but if
    the page is refreshed it shows the correct color because the workflow has finished.
    I want to override the Approval method, let it update the item so the workflow can fire and process the approval, delay the form a bit and then continue as usual so when the user is redirected to the webpart page it would render with the correct state.
    I can make a delay page that redirects to the webpart page and change the Source parameter in the items link to go there but it doesn't look that great.
    Or maybe there is a way how to do it in Javascript? I am using it in the new item form using the SP.UI.ModalDialog.showModalDialog(options) function where the dialogReturnValueCallback refreshes the windows after 3 seconds.
    dialogReturnValueCallback: function(dialogResult) {
            if (dialogResult == SP.UI.DialogResult.OK) {
             setTimeout(function(){window.location = "MyPageUrl"}, 3000)
    Thanks for any tips and ideas!

    you can try to achieve this via separate responsibility by personalizing the form by display false on the particular control button..

  • How to set item level permission for list item in SharePoint 2013

    Hi we had a custom List "ABC".
    List had 2 columns:
    Project Name: (P1, P2, P3, P4, P5, P6)
    Project Leads: (PL1, PL2, PL3, PL4, PL5, PL6).
    All project Leads can have permission to edit only their Project (P1, P2, P3) like
    PL1 can edit P1
    PL2 Can edit P2.....
    But my Question is how to restrict PL2 cannot have permission to edit P1
    is it possible to set permission for this through OOTB in SharePoint 2013.
    Any help will be appreciated......

    Hi
    check this similar post
    http://social.technet.microsoft.com/Forums/ro-RO/e1ea3655-0c6f-4b3d-a336-c42e8eb54c09/rights-to-edit-own-items-for-list-residing-on-publishing-site?forum=sharepointdevelopmentprevious
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Alerts for List Items

    Hello All,
    I'm trying to create a List with ,say , 7 questions..................and i want to link each question with an answer..........
    i tried creating alerts for each of the question however not been able to understand how can i link the question with the answer. Also didn't find any example like this.
    Can we link list Items to another Displayable Item as in Alert ???????

    Hello.........
    i tried implementing the above instruction......this is what i came through ............... and still was not able to get the things working........
    import java.lang.String;
    import java.util.Random;
    import java.lang.StringBuffer;
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.AlertType;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.List;
    import javax.microedition.lcdui.StringItem;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author Hitesh
    public class ListImplicit extends List implements CommandListener{
       // new List menu = new List("Frequently Asked Questions " , IMPLICIT, null, null);
        public Display display;
        Command back = new Command("Home", Command.BACK, 1);
        Command select = new Command("Select", Command.OK, 1);
        public List ListImplicit = new List("Menu:", List.IMPLICIT);
       public Alert alert;
        ListImplicit() {
            super("", IMPLICIT);
            setTitle(" Frequently Asked Questions ");
            /*append("1.     Do you have any service to ensure that I don’t miss any important calls?", null);
            append("2.     How do I activate Missed Call Alerts?", null);
            append("3.     Can you activate Missed Call Alerts for me?", null);
            append("4.     What is the monthly rental for Missed Call Alerts?", null);
            append("5.     Will I be able to get missed call alerts for the previous month?", null);
            append("6.     Are Missed Called Alerts free?", null);
            append("7.     Could you please tell me the renewal date for Missed Call Alerts?", null);*/
            ListImplicit.append("New", null);
            ListImplicit.append("Open", null);
            this.addCommand(back);
            this.addCommand(select);
            this.setCommandListener(this);
           // throw new UnsupportedOperationException("Not yet implemented");
        public void commandAction(Command c, Displayable d) {
          if (c == List.SELECT_COMMAND)
          String selection = ListImplicit.getString(ListImplicit.getSelectedIndex());
          alert = new Alert("Option Selected", selection, null, null);
          alert.setTimeout(Alert.FOREVER);
          alert.setType(AlertType.INFO);
          display.setCurrent(alert);
        //    throw new UnsupportedOperationException("Not supported yet.");

  • Unable to Attach file for list item using SP.File CopyTo Method

    Requirement: I have a document library and list, the requirement is i need to take a document from document library and attach to list item in the list using CSOM only.
    Followed technique: to achieve this requirement i followed below methodology
    clientContext = SP.ClientContext.get_current();            
                    webSite = clientContext.get_web();
                    webSite.AllowUnsafeUpdates =true;
                    var list = webSite.get_lists().getByTitle('Documents');
                    item = list.getItemById(3);
                    file = item.get_file();
                    file.checkOut('Comments',1);
                    file.copyTo("xxxxxxx/Lists/Student/Attachments/4/mahesh.docx","1"); 
    file.checkIn('Comments',1);
                    clientContext.load(file );
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));      
    Issue: This functionality is absolutely working fine when list item contains at least one attachment, if list item doesn't have any attachments the code is failing. i tried web.AllowUnsafeUpdates also but not working.
    Could anyone please help me on this.... :(
    Thanks in Advance!
    Regards,
    Mahesh Yamana
    Mahesh@SharepointSolutions

    Hi SK,
    Thank you for your reply!
    We are not allowed to use Visual Studio and the same thing we can use in JavaScript, but file stream takes path as one parameter which is physical location of your file system. When you use it some times users might not have access to the file system then
    our code fails.
    Regards,
    Mahesh Yamana
    Mahesh@SharepointSolutions

  • Search for list items by Created Date using caml

    Hi all,
    I'm trying to find list items with specific attributes using caml.
    I created a caml query that uses Last_x0020_Modified and File_x0020_Size for searching items.
    then i tried adding Created and Created_x0020_Date both either as Lookup or as DateTime to the caml.
    But since i added Created/Created_x0020_Date my query fails with 500 Internal Server Error.
    Can someone tell me what I'm doing wrong?
    here is my complete Entity I'm sending to SharePoint 2013:
    {'query' : { '__metadata': { 'type': 'SP.CamlQuery' }, 'ViewXml': '<View Scope="Recursive">
    <Query>
    <Where>
    <And>
    <Leq>
    <FieldRef Name="Last_x0020_Modified" />
    <Value Type="Lookup">2015-02-25T10:10:03</Value>
    </Leq>
    <Geq>
    <FieldRef Name="File_x0020_Size" />
    <Value Type="Lookup">1</Value>
    </Geq>
    <Leq>
    <FieldRef Name="Created" />
    <Value Type="DateTime">2015-02-25T10:10:03</Value>
    </Leq>
    <Eq>
    <FieldRef Name="FileDirRef" />
    <Value Type="Text">/sites/DennisDevSite/alib/Ordner1</Value>
    </Eq>
    </And>
    </Where>
    </Query>
    </View>' } }
    Thx in advance
    Dennis

    Try appending "Z" to DateTime. Change 
    <Value Type="DateTime">2015-02-25T10:10:03</Value>to <Value Type="DateTime">2015-02-25T10:10:03Z</Value>
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Populate_list is not working for list item

    i have a list item. i have a record group with a query which will return only one column.
    if i use
    populate_list(list_name,'Rg_val');
    Rg_val is the record group name
    it says error
    FRM-41334: Invalid record group for list population.
    what might be the problem?

    The record group must have at list 2 columns, one is the content of the list item(what you see in the screen) and the other is the value that the list item returns.
    if you create the record group programmatically your query must have 2 columns in the select statement, the first is the visible value of the list item and the other the real value that listitem returns.
    I attach the following code if you want to create the record group at runtime which is the best.
    declare
    additional_payments varchar2(200) := 'select codpros||' || '''. ''||' || 'description,codpros from mis_pros';
    v_rg_id recordgroup;
    v_err NUMBER:= 0;
    BEGIN
    v_rg_id := create_group_from_query('recgrp1',additional_payments);
    v_err:= populate_group(v_rg_id);
    clear_list('codpros');
    populate_list('codpros',v_rg_id);
    delete_group(v_rg_id);
    clear_list('typos');
    populate_list('typos','RECORD_GROUP1');
    delete_group('RECORD_GROUP1');
    go_block('parameters');
    execute_query;
    END;
    Be careful so as the codpros to be VARCHAR2. the 2 columns in the select statement must be of VARCHAR2 type. Try it and it ' ll work.
    If you have any question ask me again.
    Regards ,
    bill.

  • Can we give a select statement for list items

    HI
    I am new to forms please help me out...
    My question is can we give a query to list item instead of specifying the values.
    i want to fetch the values from the lookups so i need to write query which can fetch the meanings of lookups in the list...
    Thanks
    Sandeep.G

    Hello,
    See the online-help (ctrl-h) of the Forms Builder concerning the following:
    Create_Group_From_Query()
    Populate_Group_From_Query()
    Populate_List()
    Populate_List_From_Query()Francois

Maybe you are looking for

  • Sometimes an e-mail will take a long time to open

    Not all my e-mails open immediately. Some of them take a long time and I have to keep going back to them or wait until the next day. All my e-mails don't do this. Just some.

  • Media Encoder CS4 won't update - Mac

    I have CS4 and Adobe media encoder 4.1.0 will not update, I have downloaded it via software update and then it installs and after a check of software update it asks me to update exactly what I just updated. Does anyone know how I can sort this issue

  • How to pay open payables in percentage (%)

    Hi all, do you know if there is a way in SAP to pay the vendors open items in %?. In other words I need to pay a certain  number of open payables partially, given a certain %. For example: if vendor X has an open payable of 100 EUR, I wold like to pa

  • How to handle invalid URLs in the requests

    Currently JSF ignores invalid characters in the request URLs like "|" or "<script>". These characters can be a security issue and can lead to "Cross site scripting" issue. I am trying to parse the request URLs and then redirect the user to the error

  • How to create web pages in Flash?

    Hi, I am trying to create a personal portfolio website using Flash CS4. Understand that there are a number of ways to create web pages using Flash. One way is to create separate swf files for the web pages and load them when the web page is requested