Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Accessing a Lists next ID (tp_ID?)

$
0
0

Hello,

While adding an item to a list using a modified NewForm.aspx in SharePoint online, I want to obtain the next ID (system field) available for that particular list using javascript.  

I've been successful in my attempt to get this ID when I search all records and take the latest ID, however if an item is deleted from the given list it will provide an incorrect result.

Example:  <mylist>

Entry 1 - Data
Entry 2 - Data
Entry 3 - Data

If I check records, I can easily determine ID 4 will be next assigned.  However, if someone deletes Entry 3 - It will then think ID 3 is next when in fact it is still 4.  I believe I might be looking for something referred to as a tp_ID as I've seen some examples on the net on how to get it, but nothing seemed like it was javascript related.

Thanks for any help in advance,
-Kevan


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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