First call a ajax function with parameters "/_api/Web/Lists/GetByTitle(ListName)/Items?$orderby=Id desc&$top=1". Now you will get the latest added "Id".Now Divide the Id returned by the ajax by 5000. (Id/5000) So that you will get a result of how many times you need to perform the ajax.Now you can perform the ajax...
Showing posts with label RestApi SharePoint. Show all posts
Showing posts with label RestApi SharePoint. Show all posts
Thursday, March 18, 2021
Wednesday, March 17, 2021
17
Mar
we first need to get the login name of user and pass it to the get_effectiveBasePermissions method.To ensure that user has edit permission, we will check the SP.PermissionKind.editListItems enum.SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { getCurrentUserPermission();});function getCurrentUserPermission(){ ...
17
Mar
Use EffectiveBasePermissions to get permissions of the user on a list. Example:/_api/web/lists/getbytitle('L2')/EffectiveBasePermissionsNote that this will give the permissions of the logged in userfunction checkPermissions() { var call = jQuery.ajax({ url: _spPageContextInfo.webAbsoluteUrl...
Wednesday, December 2, 2020
<div><input type="button" id="btnSubmit" value="Get List Details" /></div><div id="divResults"></div><script>$(function () {$("#btnSubmit").on("click", function () {getListData();});});function getListData() {var fullUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Projection')/items";$.ajax({url:...
Wednesday, February 15, 2017
15
Feb
<script type="text/javascript">
$(document).ready(function () { getCurrentUser(); });
function getCurrentUser() {
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/CurrentUser",
...