Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

Change value on click the button imidietly

$
0
0

I have in my form column that have Button in calculated form, and I want to click on that button and to change value in column "Status"

I have this code and it is function but just on item ID 39. And I don't want that.

<script type="text/javascript">
function updateListItem(siteUrl) {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Test lohnlauf');

    this.oListItem = oList.getItemById(39);
    oListItem.set_item('Title', 'test555');
    oListItem.update();

        fieldCollection = oList.get_fields();
        clientContext.load(fieldCollection);
    alert(fieldCollection);

    clientContext.executeQueryAsync(
        Function.createDelegate(this, this.onQuerySucceeded),
        Function.createDelegate(this, this.onQueryFailed)

    );

}

</script>

Can somebody help me with my problem.

Thank you!


Viewing all articles
Browse latest Browse all 26374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>