Skip to main content
7 votes
Accepted

how to open URL Field link in new window SharePoint 2013

Open in new tab is only supported in Publishing URL field. You are using the basic URL field. You need to use PublishingWebControls:RichLinkField. This will give you the "open in new window" option. ...
Aks's user avatar
  • 487
7 votes
Accepted

Dynamically passing URL

The special characters should be encoded. Try encodeURI(attachmentsURL).
Erin L's user avatar
  • 4,028
7 votes
Accepted

Delete URL after rename [SP online]

The redirect is by design as noted in the docs: https://docs.microsoft.com/en-us/sharepoint/change-site-address - It will stay this way to make sure that all old links to the site still will work ...
Rune Sperre's user avatar
  • 2,249
6 votes
Accepted

SharePoint Online - Redirect to another page using Javascript

Try it as below: if(location.href === 'https://mysite.sharepoint.com/sites/ABC/SitePages/SPage.aspx') { location.href = "https://mysite.sharepoint.com/sites/ABC/SitePages/Pages.aspx"; }
Gautam Sheth's user avatar
  • 30.9k
6 votes

how to open URL Field link in new window SharePoint 2013

Since the control has a CssClass Property, you could manipulate the target attribute using JQuery. For example (not tested): <SharePointWebControls:UrlField ID="UrlField2" FieldName="Link Button" ...
Andy Wijaya's user avatar
5 votes

Is it possible to get an SPList object with just a Url?

Or the easier method of: using (var site = new SPSite(url)){ using (var web = site.OpenWeb()){ var list = web.GetList(url); } }
Someone's user avatar
  • 51
5 votes

Modify SharePoint Online Site Collection URL

Short answer, no, not possible a without migration of some sort.
Eric Alexander's user avatar
5 votes
Accepted

SharePoint Online - How to redirect a URL?

You "could" add a CEWP to the homepage to insert some javascript to redirect them automatically. <script> window.location.href = "https://sharepointtenant.sharepoint.com/"; </script> ...
Mike's user avatar
  • 12.2k
5 votes
Accepted

Custom URL for sharepoint Online

What @bonm014 said is true: it's not possible. The Microsoft's User Voice channel is the source for requested features and their status. Changing the tenant's name is one of the often requested ...
moe's user avatar
  • 5,267
4 votes
Accepted

SP - How to Redirect to same page with SPUtility

Please try HttpContext.Current.Request.Url.PathAndQuery inplace of this.Page.Request.Url.AbsolutePath It will get you the URL with querystring parameteres
Hardik's user avatar
  • 7,733
4 votes

Open specific excel sheet from sharepoint URL

?web=1 works to open the spreadsheet in a web browser, thanks to @Vincent Crenshaw but ?range='YourWorksheetName' doesn't work. Finally, this works for me: https://superuser.com/a/1115331 https://...
Peter Wangxin's user avatar
4 votes

how to get site collection url from SharePoint Hosted App

In your App url there are various Query String Parameters as shown here. That already containts the site collection url. The Query String paramter "SPHostUrl" will give you the site collection URl. ...
Aakash Maurya's user avatar
4 votes
Accepted

Get ServerRelativeUrl from Full Url -CSOM

Following code will return the ServerRelativeUrl: Uri uri = new Uri(fullURL); string serverRelativeURL = uri.AbsolutePath;
Sivakumar Piratheeban's user avatar
4 votes
Accepted

Get current url inside a Script Editor

I think you need to put url instead SiteUrl it will be like this : string url = SPContext.Current.Site.Url; however this code will not run try to use page variable _spPageContextInfo : string url = ...
Youssef Moumen El idrissi's user avatar
3 votes
Accepted

how to get site collection url from SharePoint Hosted App

From your SharePoint Hosted app what you can get context of host web and fetch the url of site collection You can use RequestExecutor for cross domain request as $.getScript(hostUrl + "/_layouts/15/"...
Mrunal Shidurkar's user avatar
3 votes
Accepted

Filter library by current user using url

Using JSOM you can find the current user login and create the View URL dynamically. var clientContext = new SP.ClientContext.get_current(); var oWeb = clientContext.get_web(); var currentUser = oWeb....
Amal Hashim's user avatar
  • 28.3k
3 votes
Accepted

Is there a URL that will allow users to open a survey (in it's own dialog box) without having to click the "Respond to Survey" button?

WITHOUT CODE: I always send them straight to the New Form for surveys: http://sharepoint/site/Lists/SurveyName/NewForm.aspx WITH CODE: <script> function openDialog(){ var ...
Erin L's user avatar
  • 4,028
3 votes
Accepted

REST document url

FileRef should give you the document's relative URL. $select should look like $select=FileLeafRef,FileRef,Modified,CheckoutUserId,AuthorId,OData__UIVersionString FileRef vs FileLeafRef FileRef is ...
Atish Kumar Dipongkor's user avatar
3 votes
Accepted

Newly created site collection could not be found

Looks like you miss the most important root level site collection. Could you please create the root level site collection on qwe web app. this site should be on "/" path. When you go to Create new ...
Waqas Sarwar MVP's user avatar
  • 56.9k
3 votes
Accepted

Is there a way to have a url instead of a document in a library

You can just add a Link to a Document content type Library settings -> Advanced settings -> Set "Allow management of content types?" to "Yes" Under content Types group, click "Add from existing site ...
Denis Molodtsov's user avatar
3 votes
Accepted

Sharepoint site url

in the same web app, creating the site collection with different url can be achieved using the HNSC or Create new web app with that url. Host Name Site collection have their own url. You can follow ...
Waqas Sarwar MVP's user avatar
  • 56.9k
3 votes

Sharepoint site url

The near solution is to achive that is to define managed paths in SharePoint . where you can specify the paths in the URL namespace of a web application to use for site collections. There are two ...
Mohamed El-Qassas MVP's user avatar
3 votes

SharePoint Online - Redirect to another page using Javascript

first convert the LHS and RHS to lowercase and compare. var spageUrl = 'https://mysite.sharepoint.com/sites/ABC/SitePages/SPage.aspx'; if(location.href.toLowerCase() === spageUrl.toLowerCase()) { ...
Amit's user avatar
  • 2,019
3 votes

Sharepoint 2013 get absolute URL of List using JavaScript

For Document library: Just append the _spPageContextInfo.siteAbsoluteUrl as shown below code to get absolute url of the list. function result() { var listID = list.get_id(); var listName = ...
Dikesh Gandhi's user avatar
3 votes
Accepted

Difference between Site.Url , Web.Url and Site.RootWeb

SPContext.Current.Site.Url --> It will give the root site URL i.e. site collection URL. SPContext.Current.Web.Url --> It will give the current web site url. SPContext.Current.Site.RootWeb --> An SPWeb ...
Divya Sharma's user avatar
  • 1,461
3 votes

Custom URL for sharepoint Online

No it is not possible, except for building a new tenant with the correct url/name. This is the reason a lot of migration needs to take place within SharePoint Online.
bonm014's user avatar
  • 66
3 votes

how to go to central administration in SharePoint 2016 without logging to server

Yes, you can by configuring the Alternate Access Mapping (AAM) for the Central Administration URL! in this case, you can browse the Central Administration URL from any PC within the network, but this ...
Mohamed El-Qassas MVP's user avatar
3 votes

How to get SharePoint site URL associated with Microsoft Teams

We came across your question while researching a similar problem. To my knowledge there is no simple way of doing this. In the end we decided on a combination of the Microsoft Graph API to retrieve ...
Vinko Bedek's user avatar
3 votes
Accepted

How do I get a direct download link to a public file in SharePoint online?

Thanks for the response Lee_MSFT. I couldn't get your suggestion to work, but I got an answer on another forum. I replaced everything after the last '?' with 'download=1'. Then the link can be used ...
user872650's user avatar
3 votes

What is the URL for a Custom List with only ListID?

I have listed out some approaches, please follow any of them from the below: Approach 1: <Your Site URL>/_layouts/15/listedit.aspx?List=<your list id> Example: https://...
SP 2022's user avatar
  • 4,084

Only top scored, non community-wiki answers of a minimum length are eligible