This topic has not yet been rated - Rate this topic

SPList.SaveAsNewView method

SharePoint 2013

First tries to find if the view already exists. Overwrite it if yes, add a new view if no. Then extract all the adhoc filter/sort info from the URL and build and update the view's xml Returns the url of the new/overwritten view.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ClientCallableAttribute]
public string SaveAsNewView(
	string oldName,
	string newName,
	bool privateView,
	Uri uri
)

Parameters

oldName
Type: System.String
The name of the view the user did the adhoc filter on (is currently on).
newName
Type: System.String
The desired name the user typed
privateView
Type: System.Boolean
Boolean true when the user wants make a new view that's personal
uri
Type: System.Uri
Url that keeps all the adhoc filter/sort inforatmion

Return value

Type: System.String
The url of the new/overwritten view
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.