Create List Item using SharePoint 2010 Workflow

Hello everyone.
I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.
Questions is:
I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.
I need emplement next:
When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.
I hope I explained understandable.
Thanks.

Hi Azamat,
This you can do by using SharePoint Designer workflow.
Create a sharepoint designer workflow and invoke that when new item will create in the list Employee
OnBoards.
then use Copy List item action to copy employee name to employee on board task list.
Below link will help you how to use copy list item action in a workflow.
http://blogs.salmanghani.info/copy-item-workflow-using-sharepoint-designer-2010/
Hope this will help you.
Regards
Soni K

Similar Messages

  • Create List Item using REST API

    Hi All
      I try create list item using REST in SharePoint 2013.  when code is try add new item in list , getting error :
    A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.
    Please help me
    function addData() {
    var title = $('#txtTitile').val();
    //alert(title);
    var items = {
    __metadata: { "Type": "SP.Data.OrderDetailsListItem"},
    Title:title
    var exec = new SP.RequestExecutor(appweburl);
    exec.executeAsync(
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
    method: "POST",
    data: JSON.stringify(items),
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) { alert(JSON.parse(data)); },
    error: function (error)
    { alert(JSON.stringify(error)); }
    with Regards Sivam

    Hi,                                                             
    Here is a demo which works in my environment for your reference:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function()
    $("#Button1").click(function(){
    createListItemWithDetails("list2", "http://sp2013sps", "item1");
    // Getting the item type for the list
    function GetItemTypeForListName(name) {
    //alert("GetItemTypeForListName: "+name);
    return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
    // CREATE Operation
    // listName: The name of the list you want to get items from
    // siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
    // success: The function to execute if the call is sucesfull
    // failure: The function to execute if the call fails
    function createListItemWithDetails(listName, siteUrl, title) {
    var itemType = GetItemTypeForListName(listName);
    //alert("itemType :"+itemType);
    var item = {
    "__metadata": { "type": itemType },
    "Title": title
    $.ajax({
    url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) {
    location.href=location.href;
    //success(data);
    error: function (data) {
    alert("error");
    //failure(data);
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Best regards
    Patrick Liang
    TechNet Community Support

  • FAQ - Print a List Item in SharePoint 2010

    FAQ - Print a List Item in SharePoint 2010
    step 1) Open a List;
    step 2) Hit the List tab;
    step 3) Click the Form Web Parts dropdownlist;
    step 4) Choose “Default Display Form”;
    step 5)At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP);
     step 6) From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page;
     Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window;
     In the window add the following code to display a Print Button at the top of the list item window.
    input type=”button” value=” Print” onclick=”window.print();return false;” 
    step 7) Next, hit the Page tab at the top of the page to view the List item. You should see the Print button;
     Hit the Print button to print just the list item.
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

    References:
    http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/28f02631-2291-4f8c-875a-4fa5397536ee/
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

  • How to send current list item URL in email by using sharepoint 2010 workflow?

    Hi All,
    I had created sharepoint workflow usind SPD 2010. when new item is created it sends the email with link. But it sends current list link not the current item link.
    I tried to use Encoded Absolute URL but this like
    http://asdf.com/Lists/abc/10.00
    but i need something like this
    http://asdf.com/Lists/abc/DispForm.aspx?ID
    I have grow thorough some post and i found that,
    Statically i can write http://asdf.com/Lists/abc/DispForm.aspx?ID= and from Add lookup i can get ID by choosing current item.
    The link which i get is partially hyperlink like this
    http:aasdf.com/Lists/abc/DispForm.aspx?ID=10 (here 10 is not hyperlink)
    when i copy and paste this link it works fine but by clicking it i am not getting true result.
    Please help me to solve this issue.
    Thanks.

    Hi Raymond,
    It works for me. Thank you so much.
    I also have another issue related workflow. If you can help me, i really appreciate you.
    I already configured AAM. I have two Share Point Address which are:
    Default : http://default.com
    Internal : http://intranet.com
    I have List workflow using SharePoint Designer 2010. When new item get create, it sends email to person for approval. But when it sends email it sends Dafault zone URL.
    Dafault zone URL is only accessible through Virtual Machine. We cant access from local machine. So i need to send intranet zone URL in email so user can open through local machine.
    I tried it but i can only able to do for one list. I have to so this general for every list.
    How can i send intranet zone URL?
    Swapping the zone URL is not solution for this issue because after swapping situation is same.
    Thank You.

  • Termstore changes are not getting reflected in the list items in SharePoint 2010 farm environment

    Hi,
    I had created managed metadata with termstores from central admin. Then I had created one list in which added a column of type managed metadata using the managed metadata which I had created. And also added few list items to this list.
    The problem is that after updating a termstore the changes are not reflecting in the list items which were added before the update.
    I have referred the following links:
    http://www.paulgrimley.com/2011/02/managed-metadata-changes-not-applied-to.html
    http://davidfrette.wordpress.com/2010/05/26/taxonomy-update-scheduler%C2%A0timer%C2%A0job/
    According to the links we need to run Taxonomy Update Scheduler on the server for updated termstore to get reflected. After running
    this scheduler on development environment changes are getting reflected but not working on the production environment.
    Kindly help!
    Regards, Shruti

    You should check the obvious.  You made the change in dev, but did you make the change in production too?  And, is the term you updated, actually the one that you are looking at in the list item?
    There is not much, if anything, that can go wrong with that timer job. so I'd guess that the term you are looking at is not the one you think you are updating.
    If you have double checked everything (the term is is in fact the same term id), then you may have something erroring in the update process.  In this case, you should check the ULS logs for any errors.
    Chris
    Chris Givens CEO, Architecting Connected Systems
    Blog Twitter

  • How to update selected list items in SharePoint 2010?

    Hello All
    I have a list containing field named "Category". I want to develope a solution which will take two inputs: Old Category and New Category. The expected result is: all the list items will be fetched which have Old Category input value in
    their category field and the field is replaced with the input value New Category.
    I have a limitation that I can not use Visual Studio. So I am thinking to create aspx page with content editor webpart. But I am new to all these things. Could you please suggest the development approach for this?
    Thanks.

    Hello,
    I don't think CEWP can help you because you won't be able to find old and new category when there is any change in list. However you can identify the latest modified item from list but how will you identify whether category is old or new. If you have any
    other column in list which can tell you that category value has been updated then you can write ECMA or Jquery script to update other items.
    If have any column in list then see below jquery code, where you will see how to query the list: (In my case it is Active)
    var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
    soapEnv += "<listName>Highlights</listName>";
    soapEnv += "<query><Query><Where><Eq><FieldRef Name='Active' /><Value Type='Text'>Yes</Value></Eq></Where><OrderBy Override='TRUE'><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy></Query></query>";
    soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='Links'/></ViewFields></viewFields><rowLimit></rowLimit>";
    soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>";
    Please comment if i misunderstood you?
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Create list item in sharepoint online list throws error in iPhone

    Hi all :
    I have got a piece of JS code where I am creating multiple list items. So first I am creating an Expense item and then each of the expense line item( 5 of those ) in a different list. It creates the Expense item successfully and then when it tries to
    create the line items, I am getting the following error :
    Request failed. Unexpected response from server. null
    However when I go to the line items list, I can see all the items being created!!! I am also inserting my code below.
    clientContext.executeQueryAsync(function (sender, args) {
                    var createdExpenseID = viewModel.listItem.get_id();
                    //Now create the expense line items - one by one
                    clientContext = SP.ClientContext.get_current();
                    web = clientContext.get_web();
                    list = web.get_lists().getByTitle("Expense Items");
                    var expenseIDLookup = new SP.FieldLookupValue();
                 expenseIDLookup.set_lookupId(createdExpenseID);
                    /*for (i = 1; i <= 5; i++) {
                        var descriptionField = "description"+i;
            alert(viewModel.model.window[descriptionField]);
                    itemCreateInfo = new SP.ListItemCreationInformation();
                 this.listItem = list.addItem(itemCreateInfo);           
                 //alert(list);
                 this.listItem.set_item('Title', viewModel.model.description1());
                 this.listItem.set_item('Date', $('#date1').val());
                 this.listItem.set_item('ProjectNumber', viewModel.model.projectNumber1());
                 this.listItem.set_item('ClientToPay', viewModel.model.selectedClienttopay1());
                 this.listItem.set_item('Amount', viewModel.model.amount1());
                 this.listItem.set_item('ExpenseCurrency', viewModel.model.selectedExpenseCurrency1());
                    this.listItem.set_item('ExchangeRate', viewModel.model.exchange1());
                    this.listItem.set_item('ConvertedAmount', viewModel.model.converted1());
                    this.listItem.set_item('Expense', expenseIDLookup);
                    this.listItem.update();
                    clientContext.load(this.listItem);
                    clientContext.executeQueryAsync(function (sender, args) {
        function (sender, args) {
                     alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
                    itemCreateInfo = new SP.ListItemCreationInformation();
                 this.listItem = list.addItem(itemCreateInfo);           
                 //alert(list);
                 this.listItem.set_item('Title', viewModel.model.description2());
                 this.listItem.set_item('Date', $('#date2').val());
                 this.listItem.set_item('ProjectNumber', viewModel.model.projectNumber2());
                 this.listItem.set_item('ClientToPay', viewModel.model.selectedClienttopay2());
                 this.listItem.set_item('Amount', viewModel.model.amount2());
                 this.listItem.set_item('ExpenseCurrency', viewModel.model.selectedExpenseCurrency2());
                    this.listItem.set_item('ExchangeRate', viewModel.model.exchange2());
                    this.listItem.set_item('ConvertedAmount', viewModel.model.converted2());
                    this.listItem.set_item('Expense', expenseIDLookup);
                    this.listItem.update();
                    clientContext.load(this.listItem);
                    clientContext.executeQueryAsync(function (sender, args) {
        function (sender, args) {
                     alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
       //Now redirect to the newly created item edititem.aspx page for attaching attachments
                    window.location.replace("/sites/process/Lists/Expense/EditForm.aspx?ID="+createdExpenseID+"&Source=/sites/process");
    function (sender, args) {
        alert('Expense creation failed');                
    The outermost executeQueryAsync creates the Expense item and on being successful, I create the line items.
    Any help will be much appreciated.
    Thanks and regards,
    developer_melbourne

    Ok so I resolved the issue and thought to provide the answer. It was caused by the line where it is doing redirection using window.location.replace. Somehow it works in IE, not in Safari in iPhone.
    Anyways you can do the redirection after all the items get created in the last success  method of the last item creation OR you can use deferred/promise of jQuery to achieve the same.
    Thanks

  • How to update a list item through Sharepoint Designer Workflow?

    Hi,
    I have a created a list, in which "Completion date" column is there.
    Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
    Please help.
    Thanks in advance

    Hi,
    You can use the "Build Dynamic String" action to convert the date field to a string,
    And use string comparison to determine if the date is blank
    For more information, please refer to
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
    Hope this helps
    Thanks!
    Stanfford

  • SharePoint 2013 document generation from list items using workflow

    I have been able to generate docs from list items using sharepoint designer workflow.But i have been able to do this with using one document template. But i have like 6 templates i would like to use what do i need to do to get this rolling would i need to
    have 6 different doc libs with a doc template?
    Thanks in Advance

    Thanks Sharma.
    I have create 6 content type and associated doc templates to them. I read I should be using .docx instead of dotx which I also tried
    But im still getting the error
    When I click details no error details  to help at all.
    Can anyone who is having this issue help or give me some hints.
    Cheers

  • Copy ID from one library to list using sharepoint designer workflow 2013

    Hello,
    I am new In SharePoint Designer workflow.
    I want to copy ID [by default] from one SharePoint Library to SharePoint List by using SharePoint Designer workflow 2013.
    So Please provide me any solution on it.
    Thanks,
    Samadhan.

    Hi Bjorn,
    Please create a workflow based on SharePoint 2010 platform, there is OOB action "Copy List Item" which can copy attachment to another list.
    Then use "Update List Item" action to update fields value for the new item. In this action, we could use Item title to locate the newly created item. For your reference:
    However, we cannot make this workflow to start automatically. As workaround, we could use SharePoint Designer to create a Custom Action in the Source List and initiate the workflow. In my test, I created a Custom Action in the type of List Item Menu. Then
    the custom action would appear in the Item ellipsis dropdown menu:
    Regards,
    Rebecca Tu
    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 does sharepoint designer create list item work ?.

    I'am using office 365, and sharepoint-designer (not the pro designer).
    There is a workflow rule that allows for creating items in another list.
    What i need to do is that if someone creates an entry in List A
    That List B gets an update too, based upon List A, and also a 4th list entry of list C (ea string containing "life cycle start").
    The workflow with the "rule create item in list", i've set to "start automatically when a new item is created".
    So far i've not been able to make it work, and the workflow Always suspends with vague errors, and since it is hosted i cannt do much with the errors.
    Could therefore anyone point me to a good youtube explaining this  function.
    Or might possible point out what often goes wrong when people use this.
    Maybe give some examples

    Yeeha !!!
    I got the first part working now; recap of howto:
    First of all, before you create lists and columns write it down on paper, so you will be sure about what names you will give them, as renaming these kinds of things later,  will only rename their view but not their old internal name, and as a result you
    will get lost if you want to automate stuff later on.
    So have you design ready (or in my case; delete current wrong site and start over clean).
    Recap :
    Using SharePoint designer:
    Create List A, use titles as the field to enter product names (or whatever item you like to registrate).
    Use the web browser:
    Goto List A you just made and set the title column to contain (required) unique index names.
    You can do this as Admin through list setting in the list top ribbon.
    Create List B using Sharepoint designer (simple list)
    In List B create a Lookup list to List A
    And select it so that you would like to see the title column in it.
    Using the web brouwser, make this column a required field (will become a (*) mark later).
    Using SharePoint designer, select list A.
    Select properties of List A, create a new (basic) workflow for it.
    Here you would assume that you need to get the title in List B, but that's wrong
    What one needs to get in List B a new to the current added Item in List A is the following:
    Note that the workflow will run under the context of new Items who are added to List A
    Create an action rule "Create list item" in the following list, and here select List B
    The pop will show you some fields marked with a (*) as required fields.
    Now the tricky thing is that is a reference to List A, and not a string.
    So you might think its a GUID then or so, but no wrong again.
    To get the link to the current List item A inside B.
    You will have to link it to  "Current Item"   (remember the workflow started from list A )
    And from the Current Item, you have to select the "ID" property.
    Apparently ID is internally used as a reference.
    Now whenever you create an Item in list A, it will be created in List B as well as a linked reference.
    So for example in A you could add more columns, like serial ID or creation time of article A.
    Then you don't have to add these into List B, as when people click on the hyperlink in List B they will be shown the details from list A.

  • Prevent Sharepoint 2010 workflow to send duplicate emails

    I have SharePoint 2013 as environment but am using SharePoint 2010 workflow on a list. There is a field in this list called "Order Status" which has different status such as Processing, Shipped, Cancelled, Hold. There is another list which updates
    this Order Status. I have the workflow send out an email when the Order Status changes to Processing and another email when Order Status changes to Shipped.
    The issue is that there are multiple emails being sent out when any of these status changes to either Processing or Shipped. There is no other workflow attached to this list 
    How do I prevent the workflow to send duplicate emails? I have seen that a flag could be setup to track the email sent once but that method does not work correctly and it still sends out duplicate emails. Or maybe I am not doing this correctly
    Any suggestions, comments or have anyone resolved this successfully
    Thanks Snehal H.Rana SharePoint Consultant

    Hi Snehal
    If you check the workflow history, you will probably see that every time an item is added or modified, the workflow runs twice. That’s why you’re receiving two email notifications. 
    The reason for this is timing. If your workflow is very short and the SharePoint server is very slow, the first instance of the workflow may finish well before the item is fully saved and committed to SharePoint. As the item is being processed, the workflow
    event receiver can fire again, and start another instance of the workflow.
    The solution for this problem is to add a step at the end of your workflow which will pause the workflow for a few minutes .
    Another Option is to use a Flag.For Setting up flag correctly check the following link
    http://www.mssharepointtips.com/tip.asp?id=1145
    Please 'propose
    as answer' if it helped
    you, also 'vote
    helpful' if you like this
    reply
    Amit Kotha

  • Rating a List Item using jquery with out using User profile service

    Hi,
    I dont have access to Central admin and i was not not able to enable USer profile service.
    can i rate a list item in Sharepoint 2010 using any jquery plugin
    i got the link
    http://blogs.msdn.com/b/carloshm/archive/2009/08/24/jquery-rating-in-sharepoint-lists.aspx
    But i am not able to find any plugin in it.
    Please advice.
    Thnaks,
    Pallavi

    Hi,
    According to your post, my understanding is that you wanted to rate a list item using JQuery in SharePoint 2010.
    The link you had posted above is for SharePoint 2007.
    You can refer to the following articles which about using the JQuery to call the rating service.
    http://blog.dennus.net/2011/08/09/using-spservices-and-jquery-to-include-social-rating-control-on-_layouts-page/
    https://www.habaneroconsulting.com/insights/Calling-the-Rating-Service-using-jQuery-in-SharePoint-2010-Part-1-of-2#.UxbQxvmSz6k
    You can also use the tool of the CodePlex to achieve it.
    http://sptoolbasket.codeplex.com/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Need to create a workflow that sends an email every friday, not every 7 days using sharepoint 2010

    Hi Everyone,
    So I need to have a workflow in sharepoint designer 2010 that sends an email out every friday, so far all the ones I have seen send it out 7 days from when the item was created, but not every (certain day of the week)
    Any help at all would be great.
    Thanks
    Best regards, Mike

    Hi,
    Greetings,
    Use Information Retention policy settings as below.
    pls check below
    http://social.technet.microsoft.com/Forums/office/en-US/7be77b5d-c686-4b33-b30c-204f7ffcd569/how-to-send-reminder-email-for-every-2-days-after-due-date-occurs-in-sharepoint-2010-workflow?forum=sharepointadminprevious
    I recommend to use Information Management Policy and workflow to achieve this goal.
    https://www.earley.com/blog/sharepoint-2010-using-retention-stages-manage-lifecycle-information
    http://www.danielroot.info/2012/08/information-management-policy.html
    You can also create custom timer job to start the workflow at a schedule time:
    http://bhandariasb.wordpress.com/2013/06/03/start-workflow-from-custom-timer-job/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • The Create List Item workflow action does not work in document library with document template

    My end goal is more complex but below is a basic example of the issue I’m having that just simply does not work.
    I'm trying to use a site workflow to create an item in a document library that has a document template applied to it but the file that gets created by the workflow is corrupt and cannot be opened.
    I created a document library and edited the document template by adding some text to the header and changing it to a Word docx file instead of a Word dotx file. I tested the document template by clicking the files tab in the ribbon and then clicking new
    document which opens the document template in Word and allows me to edit and save the document back to SharePoint. Then I created a SharePoint 2013 site workflow in SharePoint Designer that contains a single Create List Item action, and that action creates
    an item in the document library with the name field statically defined. I published the workflow and then manually start it on the site. The workflow completes successfully and when I navigate to the document library the document has been created by the workflow.
    When I click on the document to open it in the Word Web App it throws the error pictured below and if I open it in the Word client application it just opens a blank document and not the correct document template.
    I also tried using a SharePoint 2010 workflow with pretty much the same results. Opening the document in Word Web App gives the same error as above and opening the document in the Word client application gives the error pictured below.
    Come on Microsoft creating a Word Document in a SharePoint Document Library from a SharePoint Workflow should just work! Is this a bug or does anyone have any ideas on what is causing the this issue?

    I had the same problem with corrupted document - this worked for me:
    1. Create a 2010 Workflow which creates the list element in a document library
    (you may start this workflow from your 2013 workflow if applicable)
    2. In the Create New List Item properties - make sure to set ContentTypeId to your content type
    ("Id for indholdstype" is Danish for "Contenttype ID")
    3. Your Content Type template should be a ".docx" file - NOT a ".dotx" file...!
    (I have always created my templates for content types as .dotx files - seems Microsoft wants us to use ordinary .docx files as template files for content types)
    Hope this helps you!

Maybe you are looking for

  • Getting error 600 while exporting

    hi friends.... I am trying to export a dump in oracle 10g but getting undermentioned error... UDE-00008: operation generated ORACLE error 600 ORA-00600:internal error code, arguments:[17069],[0x0A0A5D5E8],[],[],[],[],[],[] Thnx....

  • Is every form on project instatiated on startup?

    Is every form on project instatiated on startup? if so, how do i prevent this from happening, as far as i understand every forms gets instatiated but im not really sure of this, i remember delphi IDE would allow you to select which forms would be loa

  • Error using sdo_cs.transform_layer

    I try to execute SDO_CS.TRANSFORM_LAYER but always returns error. I use this parameters CALL SDO_CS.TRANSFORM_LAYER('B$FUSE_PT','G3E_GEOMETRY','B$FUSE_PT_2',4269); The describe of B$FUSE_PT table is: G3E_FNO     NUMBER(5) G3E_FID     NUMBER(10) G3E_C

  • Issue with Movement type

    Dear Experts, I am facing issue and in understanding with movement type 103,105 and 106. Purchase order has been created with 100 pcs 1) Movement type 103 made for block stock. 2) Movement type 105 to remove stock from block stock. 3) Movement type 1

  • Updated iPhoto but won't open with Yosemite, why?

    Updated to Yosemite, said to update iPhoto.  Downloaded iPhoto but it will not open.  Help.