TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aron mist
NA
29
1.3k
Some views are missing from my List view
Jan 1 2019 9:50 AM
<script> var viewCollection = null; function runCode() { var clientContext = new SP.ClientContext.get_current(); if (clientContext != undefined && clientContext != null) { var web = clientContext.get_web(); var listCollection = web.get_lists(); var list = listCollection.getByTitle("MyListName"); this.viewCollection = list.get_views(); //var viewInfo = new SP.ViewCreationInformation(); //viewInfo.set_title('MyView'); //this.viewCollection.add(viewInfo); clientContext.load(this.viewCollection); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); } } function onQuerySucceeded() { var viewInfo = 'Tasks list current views: \n\n'; var viewEnumerator = this.viewCollection.getEnumerator(); while (viewEnumerator.moveNext()) { var view = viewEnumerator.get_current(); viewInfo += view.get_title() + '\n'; } alert(viewInfo); } function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); } </script> <a onclick='return runCode();'>Click here</a>
Reply
Answers (
3
)
SharePoint 2013 mail url is not functioning
How to SPO sites default language