{"id":1007,"date":"2017-09-20T16:20:42","date_gmt":"2017-09-20T22:20:42","guid":{"rendered":"http:\/\/www.idubbs.com\/blog\/?p=1007"},"modified":"2017-09-20T16:20:42","modified_gmt":"2017-09-20T22:20:42","slug":"source-parameter-still-alive-in-modern-pages","status":"publish","type":"post","link":"https:\/\/www.idubbs.com\/blog\/2017\/source-parameter-still-alive-in-modern-pages\/","title":{"rendered":"Source Parameter Still Alive in Modern Pages"},"content":{"rendered":"<p>SharePoint\u2019s \u201cmodern\u201d capabilities are changing the face of SharePoint \u2013 for the better. But it is taking us further away from some of the tricks and approaches that work with \u201cclassic\u201d SharePoint. Thankfully one of the long-standing legacy features of SharePoint still seems to work \u2013 the Source parameter.&nbsp; <\/p>\n<p>When used as part of a URL in SharePoint the Source=[URL] parameter takes users to the specified page after a form is saved or cancelled. This allows us to manage some of the navigation flow for users. <\/p>\n<p>So how does this work with \u201cmodern\u201d lists and pages. On a list, you have the \u2018New\u2019 item button on the top bar. <br \/><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image_thumb.png\" width=\"416\" height=\"43\"><\/a><\/p>\n<p>When you click it the new item panel opens up. The top links on the panel include a \u2018Copy link\u2019 link. <br \/><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image_thumb-1.png\" width=\"244\" height=\"142\"><\/a><\/p>\n<p><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/09\/image_thumb-2.png\" width=\"244\" height=\"175\"><\/a><\/p>\n<p>\u2018Copy link\u2019 for the New Item gives us the URL of the New Item form that can be used to link from other locations \u2013 such as an email footer, the left nav in a SharePoint site, etc. This link includes the <strong>Source<\/strong> parameter and by default will go to the default list view page for the list. Usually, that\u2019s not where we\u2019d like to see users end up. <\/p>\n<p>If I\u2019m building an intake solution, I might have a \u2018My Requests\u2019 page where I\u2019d like users to end up. To make that happen it\u2019s as easy as copying the link from the New Item page, getting the link to the My Requests page, and then swapping out the Source parameter value.<\/p>\n<p>The default New Item link (with site-specific stuff stripped out): <br \/><a title=\"https:\/\/a830edad9050849554e17081014.sharepoint.com\/sites\/IgniteAwesomeness\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=%7BA12AC292-FCC4-44E6-B521-8BF8407EC9C1%7D&amp;RootFolder=&amp;Source=https%3A%2F%2Fa830edad9050849554e17081014.sharepoint.com%2Fsites%2FIgniteAwesomeness%2FLists%2FITRequest%2FAllItems.aspx&amp;ContentTypeId=0x01000AA4664ACF1F7E4E94B805C33881785E\" href=\"https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=[listGUID]&amp;RootFolder=&amp;Source=[THIS IS WHAT YOU CHANGE]&amp;ContentTypeId=[contentTypeId]\">https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=[listGUID]&amp;RootFolder=<font style=\"background-color: #ffff00\">&amp;Source=[THIS IS WHAT YOU CHANGE]<\/font>&amp;ContentTypeId=[contentTypeId]<\/a><\/p>\n<p>Target destination URL: <br \/><a title=\"https:\/\/a830edad9050849554e17081014.sharepoint.com\/sites\/IgniteAwesomeness\/SitePages\/My%20IT%20Requests.aspx\" href=\"https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/SitePages\/My%20IT%20Requests.aspx\">https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/SitePages\/My%20IT%20Requests.aspx<\/a><\/p>\n<p>The link you\u2019ll use: <br \/><a title=\"https:\/\/a830edad9050849554e17081014.sharepoint.com\/sites\/IgniteAwesomeness\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=%7BA12AC292-FCC4-44E6-B521-8BF8407EC9C1%7D&amp;RootFolder=&amp;Source=https%3A%2F%2Fa830edad9050849554e17081014.sharepoint.com%2Fsites%2FIgniteAwesomeness%2FLists%2FITRequest%2FAllItems.aspx&amp;ContentTypeId=0x01000AA4664ACF1F7E4E94B805C33881785E\" href=\"https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=[listGUID]&amp;RootFolder=&amp;Source=https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/SitePages\/My%20IT%20Requests.aspx&amp;ContentTypeId=[contentTypeId]\">https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/_layouts\/15\/listform.aspx?PageType=8&amp;ListId=[listGUID]&amp;RootFolder=<font style=\"background-color: #ffff00\">&amp;Source=<a title=\"https:\/\/a830edad9050849554e17081014.sharepoint.com\/sites\/IgniteAwesomeness\/SitePages\/My%20IT%20Requests.aspx\" href=\"https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/SitePages\/My%20IT%20Requests.aspx\">https:\/\/[mydomain].sharepoint.com\/sites\/[sitename]\/SitePages\/My%20IT%20Requests.aspx<\/a><\/font>&amp;ContentTypeId=[contentTypeId]<\/a><\/p>\n<p>Using this approach you have a link you can use where users will be able to submit a new request, then end up on the My IT Requests page rather than the default list view page. <\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/msdn.microsoft.com\/en-us\/pnp_articles\/modern-experience-customizations\" target=\"_blank\">Customizing the \u201cmodern\u201d experiences in SharePoint Online<\/a><\/li>\n<li><a title=\"https:\/\/msdn.microsoft.com\/en-us\/pnp_articles\/modern-experience-customizations-customize-pages\" href=\"https:\/\/msdn.microsoft.com\/en-us\/pnp_articles\/modern-experience-customizations-customize-pages\" target=\"_blank\">Customizing \u201cmodern\u201d site pages<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SharePoint\u2019s \u201cmodern\u201d capabilities are changing the face of SharePoint \u2013 for the better. But it is taking us further away from some of the tricks and approaches that work with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10,11,21],"tags":[138,130],"class_list":["post-1007","post","type-post","status-publish","format-standard","hentry","category-office365","category-sharepoint","category-sharepoint-online","tag-modern","tag-source"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgWQ1-gf","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/comments?post=1007"}],"version-history":[{"count":1,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1007\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1007\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/media?parent=1007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/categories?post=1007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/tags?post=1007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}