SharePoint Developer - Quick References
Source - https://cheatography.com/sharepointerie/cheat-sheets/sharepoint-developer-cheat-sheet/
General querystring tricks
Web Part Maintenance Page | ?contents=1 |
Open Page Modal | ?isdlg=1 |
Setting Initial Ribbon | ?InitialTabId=Ribbon.Library |
Set page mode | ?mode=edit |
Set page view | ?PageView=Personal |
Set the tool pane view | ?ToolPaneView=2 |
Set the mobile view | ?mobile=1 |
URL location in SharePoint
View content and structure | /_layouts/sitemanager.aspx |
View the user information list | /_catalogs/users/simple.aspx |
View the taxonomy hidden list | /Lists/TaxonomyHiddenList/AllItems.aspx |
Log in as another user | /_layouts/15/closeConnection.aspx?loginasanotheruser=true |
Save a site as a template | /_layouts/savetmpl.aspx |
Tokens at the beginning of a URL in SP2013
URL of the ControlTemplates virtual folder for the current website | ~controlTemplates |
URL of the Layouts virtual folder for the current website | ~layouts |
URL of the current website | ~site |
URL of the parent site collection of the current website | ~sitecollection |
Tokens at the beginning of a URL in SP2010
Web site (SPWeb) relative link | ~site |
site collection (SPSite) relative link | ~sitecollection |
Tokens at the beginning of a URL in an App
URL of the parent site collection of the current website | ~sitecollection |
URL of the current website | ~site |
URL of the app web of an app for SharePoint | ~appWebUrl |
URL of the ControlTemplates virtual folder for the current website | ~controlTemplates |
URL of the host web | ~hostUrl |
URL of the logo of the host web | ~hostLogoUrl |
URL of the Layouts virtual folder for the current website | ~layouts |
URL of a remote web application in an app for SharePoint | ~remoteAppUrl |
List querystring tricks
Finding the Id (Guid) of a List | ?List=%7B26534EF9%2DAB3A%2D46E0%2DAE56%2DEFF168BE562F%7D |
Finding the internal name of a column | ?Field=fieldInternalName |
Filter a list | ?FilterField1=fieldName&FilterValue1=value |
Sort a list | ?SortField=fieldName&SortDir=Desc |
To filter a list you must set internal field name in the the FilterField parameter (not the display name) and the value in the FilterValue parameter. You can specify multiple filter : FilterField1, FilterField2 etc...
You can use the SortField and SortDir parameters to sort on any column in the view either Desc or Asc.
Tokens that can be used inside a URL in SP2013
URL of the ControlTemplates virtual folder for the current website | {ControlTemplates} |
ID of an item in a list or library (an integer) | {ItemId} |
URL of the item being acted upon | {ItemUrl} |
URL of the Layouts virtual folder for the current website | {Layouts} |
ID of the current list (a GUID) | {ListId} |
Recurrence index of a recurring event | {RecurrenceId} |
URL of the current website | {Site} |
URL of the parent site of the current website | {SiteCollection} |
URL of the current website | {SiteUrl} |
HTTP Request URL | {Source} |
Tokens that can be used inside a URL in SP2010
Integer ID that represents the item within a list | {ItemId} |
URL of the item being acted upon. Works only for documents in libraries | {ItemUrl} |
GUID that represents the list | {ListId} |
URL of the Web site (SPWeb) | {SiteUrl} |
Recurrence index | {RecurrenceId} |
Tokens that can be used inside a URL of an app
OAuth context token for the app | {AppContextToken} |
URL of the app web in an app for SharePoint | {AppWebUrl} |
Client cache control number (client tag) for the current website | {ClientTag} |
Logo for the host web of an app for SharePoint. | {HostLogoUrl} |
Title of the host web of an app for SharePoint | {HostTitle} |
URL of the host web of an app for SharePoint | {HostUrl} |
ID of an item in a list or library (an integer) | {ItemId} |
URL of the item being acted upon | {ItemUrl} |
Current language/culture of the host web of an app for SharePoint | {Language} |
ID of the current list (a GUID) | {ListId} |
Full build version number of the SharePoint farm | {ProductNumber} |
Recurrence index of a recurring event | {RecurrenceId} |
URL of a remote web application in an app for SharePoint | {RemoteAppUrl} |
URL of the current website | {Site} |
URL of the parent site of the current website | {SiteCollection} |
URL of the current website | {SiteUrl} |
HTTP Request URL | {Source} |
Resolves five standard tokens | {StandardTokens} |
0 comments