0

Im trying to create Items via ECMA Script & the client sided object model (CSOM).

Unfortunately I couldnt find an answer yet, can you tell me how to create it? I want to translate this function to the CSOM world :

 function Create_Hyperlink(address, description, comment) {
    var URL = address + " , " + description;
    $().SPServices({
        operation: "UpdateListItems",
        listName: "Hyperlinks",
        batchCmd: "New",
        valuepairs: [["URL", URL], ["Comment", comment]],
            completefunc: function (xData, Status) {
            alert("Created");
            }
    });
 }

Thanks for your replies :))

  • just a remark... I would try to avoid the dollar-sign in your js since some sharepoint js-files use this... You can just replace your "$" with "jQuery" and it'll work also – Ruben Herman Aug 2 '12 at 11:50
2

Learn to Google, my friend. The skill will serve you well. First hit on a search for "create list item javascript client object model" was:

How to: Create, Update, and Delete List Items Using JavaScript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.