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!