Friday, November 13, 2015

How to get current item Id in Edit form.aspx SharePoint?



JSRequest class is a JavaScript object that lives on all SharePoint Pages, and allows us to simply and quickly get query string values using JavaScript

//First we must call the EnsureSetup method
JSRequest.EnsureSetup();

//Get a query string parameter called Id. i.e - "page.aspx?Id=11" will return 11
var itemId = JSRequest.QueryString["ID"];

No comments:

Post a Comment