Add new item to antoher site list

rss

Posted by Sebastian Haugland - Apr 28 ’15 at 06:25

I have made a form in one list and in that form I would like to have a button where I can click to add an item (with predefined data) to another list in another site. Any suggestions to a script? (no user input)

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 15 days
    #1 by Dmitry Kozlov Apr 29 ’15 at 04:26

    Hi Sebastian,

    You can add an item to another list with the help of JavaScript by using CSOM (or REST) and our JS-framework to retrieve values from the current form's fields.

  • Sebastian Haugland
    Sebastian Haugland
    Member
    Member for: 6 years 8 months 11 days
    #2 by Sebastian Haugland Apr 29 ’15 at 05:44

    Thanks, but I have allready tried that  - gets no error, just not working - , is this only working in SP 2013? (I am on 2010).

    Could all functions be in the button script or do they have to be in the JS editor of the form? (only calling them from the button.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 2 months 15 days
    #3 by Dmitry Kozlov Apr 29 ’15 at 05:54

    [#2]: This approach works in SharePoint 2010 as well:

    https://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx

    You can define functions globally in the general JavaScript editor of Forms Designer but you should use the following syntax:

    window.my_global_func = function() {
    
    }

    Next, you will be able to use this function in OnClick handlers:

    my_global_func();
  • mattsimons
    Member
    Member for: 5 months 25 days
    #4 by mattsimons Jun 11 ’21 at 08:39

    Your final year dissertations are your career-defining projects. Most employers judge their candidates with their dissertation grades. So, your projects need to be accurate, professional and well-researched. That’s the reason why many academic experts recommend students to access professional help from our cheap UK dissertation help. We offer the most affordable and reliable services in town. Visit our website and book our services now!

  • mattsimons
    Member
    Member for: 5 months 25 days
    #5 by mattsimons Jun 11 ’21 at 08:39

    Your final year dissertations are your career-defining projects. Most employers judge their candidates with their dissertation grades. So, your projects need to be accurate, professional and well-researched. That’s the reason why many academic experts recommend students to access professional help from our cheap UK dissertation help. We offer the most affordable and reliable services in town. Visit our website and book our services now!

  • jasminmark
    Member
    Member for: 2 months 29 days
    #6 by jasminmark Sep 7 ’21 at 05:34
    1. No matter how fast you need help, you cannot ask someone online to write 'my letters'. You should only rely on reputable organizations with your college essay help online; just like us! We at Write My Letters are the people you need to look for in this emergency.

  • waliajasmin01
    Member
    Member for: 2 months 28 days
    #7 by waliajasmin01 Sep 8 ’21 at 09:45

    If you are looking to increase visibility in search results and appear prominently compared to other companies, contract the Premium service and it will appear prominently in the first positions on the results page when potential buyers search for products or services related to your company.

Displaying 1 to 7 of 7 messages