-
-
Save beckettkev/e28687487b08cea2b6ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({url: window.location.href.toLowerCase().split('pages')[0] + "_api/web/getFileByServerRelativeUrl('" + window.location.pathname + "')/checkOutType", | |
headers: { "Accept": "application/json; odata=verbose" }, | |
success: function(data) { | |
if(data.d.CheckOutType === 0) { | |
console.log('The file is checked out'); | |
} else { | |
console.log('The file is not checked out'); | |
} | |
console.log(data.d.CheckOutType, 'data.d.CheckOutType'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment