none
Sharepoint ticket tracking EXIT Sharepoint on save RRS feed

  • Question

  • I have the basic Sharepoint ticket tracking system put together and ready to use.

    The only problem is that when the user clicks "Save" it opens the list of all the tickets.

    I need it to just exit out of Sharepoint when they click "Save".

    Thank you in advance for any help.

    Gee


    Gee

    Thursday, November 7, 2019 7:56 PM

Answers

All replies

  • You can redirect the page to another page after submitting / saving. Below code for your reference:

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    
    $(document).ready(function()
    
      {
    
          $('input[value=Save]').click(function() { window.location.replace("http://<site>/<destination>");});
    
      });
    
    </script>

    https://www.sharepointdiary.com/2011/05/redirect-to-another-page-after-new-item-submit.html

    https://social.technet.microsoft.com/Forums/en-US/fe93d085-20fd-45c6-a5f4-2699dabf6cbf/sharepoint-list-after-saving-redirect-to-custom-page?forum=sharepointgeneral

    https://www.nhaustralia.com.au/blog/How-to-Redirect-to-a-different-page-after-adding-new-list-items-in-SharePoint/

    Thanks & Regards,

     

    sharath aluri

    Thursday, November 7, 2019 9:13 PM
  • Hello,

    Is there anything a bit less complicated?

    I'm not good at HTML and I need it to just exit Sharepoint instead of redirect.

    Is that possible?


    Gee


    • Edited by GretaF Thursday, November 7, 2019 9:56 PM
    Thursday, November 7, 2019 9:31 PM
  • Hi GretaF,

    OOTB method can't complete your needs.

    According to my research, there is no better or simpler way to meet your needs so far.

    The advice from Sharath seems to be the most appropriate option.

    Best regards

    Itch Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, November 8, 2019 2:12 AM
  • Hi

    I am checking your situation here.

    Any progress on your troubleshooting?

    If you think the replies are helpful to you, please remember to mark them as answers. It will help others who meet the similar question in this forum.

    Best regards

    Itch Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.


    Monday, November 11, 2019 8:24 AM
  • Hello,

    I did get it to redirect to a SharePoint site where the link will be located in the future, but it doesn't ALWAYS work.

    Sometimes, when I fill in the info on the form and click "Save" it sends me to the URL I've set and redirect, but not always.

    Sometimes, when I fill in the info on the form and click "Save" it sends me to the List the form is associated with.

    The script is below.

    blah1 is my company, blah2 is the particular team.

    BTW:  Clicking "Cancel" sends to that site every time, no problem.  It's "Save that's not working.

    $(document).ready(function() {
         $('input[value=Save]').click(function() {     
            window.location.replace("https://blah1.sharepoint.com/teams/blah2/sitepages/index.aspx");  
          });   
         $('input[value=Cancel]').click(function() {       
            window.location.replace("https://blah1.sharepoint.com/teams/blah2/sitepages/index.aspx");  
          });  
        });
    </script>  
    <script type="text/javascript" src="/test/English/Javascript/sessvars.js"></script>
    <script type="text/javascript">
    function PreSaveAction(){
    sessvars.targetUrl = ‘<script src="/SiteAssets/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script>  
    <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script> 
    <script type="text/javascript">      

    $(document).ready(function() {
         $('input[value=Submit]').click(function() {     
            window.location.replace("https://blah1.sharepoint.com/teams/blah2/sitepages/index.aspx");  
          });   
         $('input[value=Cancel]').click(function() {       
            window.location.replace("https://blah1.sharepoint.com/teams/blah2/sitepages/index.aspx");  
          });  
        });
    </script>  


    <script type="text/javascript" src="/test/English/Javascript/sessvars.js"></script>
    <script type="text/javascript">
    function SaveAction(){
    sessvars.targetUrl = "https://blah1.sharepoint.com/teams/blah2/sitepages/index.aspx";
    return true;
    }
    </script>


    Gee

    Monday, November 11, 2019 3:42 PM
  • Hi Gee,

    You can use fiddler to see if a error occurred when the page was redirected.

    Information about Fiddler

    Best regards

    Itch Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, November 12, 2019 2:27 AM