How to: Redirect after document adding to a sharepoint document library - sharepoint

i need to redirect the current user to a custom url after successfully uploading a document.
the user clicks "+ new document" in the document library
the user selects a local document
the document gets uploaded and in that moment after it is successfully uploaded and the item is created in the list, i want to redirect the user to a custom url
Normally after successfully uploading a document to a document library under SharePoint 2010, the user gets a modal dialog where he sees only the field "Name" with the filename.
I want to prevent this. How could i achieve this?
Update
Isn't it possible to redirect a User after Document uploading inside a Document Library to redirect from Upload Form to a custom page instead of Edit.aspx within ann EventReceiver?
I am really frustated! I am now trying for over 3 days to get it working.
Here is my sample solution:
http://www.bog1.de/downloads/errd01.zip
You must create a document library "doclib" to get it work.
But it does not work! I have used samples from several sites. I have added the logic inside the ItemAdded event. But nothing happens. I only want to redirect the user to another page after successfully adding a document to a library. Is this such a hard problem to get it work untder sp2010?

It seems, that it is not possible in SharePoint 2010 inside an EventReceiver to redirect to a SharePoint page withoug haveing a modal dialog as in CancelWithRedirectUrl.

Related

Why are my Sharepoint Links missing the Tenant?

I am working on an automate flow that emails a share point page to a list of subscribers whenever the page is updated.
Everything works except the links contained in the email (/page). On share point i am able to navigate to the link however in the email the page redirects me to /sites/xxx/xxx.aspx. It is missing the tenant information.
Is there a setting i missed or something that is preventing sharepoint from including the full link when sending the email?
I made sure the full link was typed when the hyperlink was created and am using an HTTP to share point (in automate) and inserting the "CanvasContent1" into the email. I checked the html being sent and the link title is given as the full link but the href is given as /sites/xxx/xxx.aspx.
Thank you for everything
On a SharePoint page, links will be converted to relative links when the page is saved.
If you copy the page content as rendered into an email, then, yes, the tenant will not be included in the link, since the link is never intended to be used outside of the context of the page, where the link works fine.
So, you need to change your approach when emailing the page. Maybe email just a link to the page, then people can take it from there. Or, manipulate the html content in PowerAutomate and replace /sites/xxx with https://Yourtenant.sharepoint.com/sites.xxx

How to update link to documents in Sharepoint

Recently, we updated the URL for our Sharepoint site. I have added AAMs to direct any users trying to access the site through the old URL to the new URL. So far, everything has been working fine. Recently, while browsing through a document library, I noticed when I clicked on the ellipses on the name of a document so I could copy the link associated to the document, the URL appears as http://NewSiteURl/http://OldSiteURL/...
I notice it is not every single document in my library that presents links like this, but I do notice it in random documents throughout the library. How can I fix this issue so all links to documents within the library so it doesn't contain the old site url?

Sharepoint workflow wont start automatically

So I have a contact form on this website that populates a list, I then have a workflow that whenever a new item is created it sends an email with the contents of the form.
So I can actually go into the list and add a new item manually and it will send perfectly, however whenever I go and use the form on the website it does not send the email.
I've checked to make sure that the form is populating the list and it is. Anyone have any ideas why its not starting automatically?
If your form saves the item as a system account the workflow wont start. Is the form saving as the logged in user, using impersonation or elevated privileges?

Set field via URL

Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.
Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3
If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?
Thanks!
Not Out Of The Box (OOTB) - but you've a few options.
Write an ASPX page to do what you want
Use something like SPServices and javascript to update the list item via the web services.
Use the Client Object Model (2010 only)
By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.
It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client
The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.
To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.
Thorsten

How to allow Users to request access to a particular document in SharePoint?

I would like to create something in SharePoint that allows users to request access to particular documents and then for me to be able assign access for a period. Would this be possible in SharePoint? If so, how would i go about doing this? What must i use?
Thanks in advance!
Set up a SharePoint Group for those documents and then allow users to request membership to the group.
This is how I would do it:
Add a hyperlink column to the Document Library
Add a 'New Item' event handler to the DL which adds the url to the hyperlink column, and point the hyperlink to your own ASP.Net page (or even the DL itself), with details of the document required (ID et al) in the GET string. Call this hyperlink 'Request Access' or something similar.
Create a webpart which checks the GET string for the right variables, identifies the user (currently logged in user viewing the page the webpart is on) and sends you an email informing you of the request. Add this webpart to the target ASP.Net page in step 2.
When a document is added, the event handler will update the hyperlink column with the required hyperlink. When a user requires access, they will click on the properly formed hyperlink, which will take you to a page with the receiver webpart on it. The receiver webpart will get the required information from the GET string, inform you via email, and also inform the user that the request has been received.
Although I'm sure theres a better way to do this...
You can modify the "popup" menu that's shown while hovering over the document. Add a link to that menu, here's an example of how to change the hover menu:
www.articlestreet.com/computers/send-a-sharepoint-document-library-file-as-email.html

Resources