Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uncaught Error: The property or field has not been initialized.
- It has not been requested or the request has not been executed.
- It may need to be explicitly requested.
- var CustomAction = function(){
- var clientContext = new SP.ClientContext.get_current();
- var web = clientContext.get_web();
- this.oList = web.get_lists().getByTitle("Classification");
- // .load() tells CSOM to load the properties of this object
- // multiple .load()s can be stacked
- clientContext.load(oList);
- // now start the asynchronous call and perform all commands
- clientContext.executeQueryAsync(Function.createDelegate(this, this.onSuccess), Function.createDelegate(this, this.onFailure));
- // method will exit here and onSuccess or OnFail will be called asynchronously
- };
- function onSuccess(sender, args) {
- alert('No of rows: ' + oList.get_itemCount());
- };
- function onFail(sender, args) {
- alert('Request failed.n' + args.get_message() + 'n' + args.get_stackTrace());
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement