Advertisement
In this article we can able
to see how to get the current item id for newly created item, using REST API
and JQuery.
We are having filed with
name “RequestID” and couple of fields and having a custom button.
Call this function on
“getNewRequestItemID” button click and use the below code.
<script
type="text/javascript"
src="/Dotnetsharepoint/SP2013/SiteAssets/jquery-1.11.0.min.js"></script>
<script
type="text/javascript">
$(function () {
var listname = "YOURLISTNAME";
function
getNewRequestItemID(listname){
var currentitemid=0;
var siteURL =
_spPageContextInfo.webAbsoluteUrl;
$.ajax({
url: url,
method: "GET",
async: false,
headers: { "Accept":
"application/json; odata=verbose" },
success: function (data) {
if(data.d.results.length>0){
currentitemid = data.d.results[0].ID;
$("input[title =
'RequestID']").val(currentitemid);
}
},
error: function (data) {
}
});
}
Amazing Article, Really useful information to all So, I hope you will share more information to be check and share here.
ReplyDeleteJupyter Notebook
Jupyter Notebook Online
Jupyter Notebook Install
Automation Anywhere Tutorial
Rpa automation anywhere tutorial pdf
Automation anywhere Tutorial for beginners
Kivy Python
Kivy Tutorial
Kivy for Python
Kivy Installation on Windows