Friday, September 25, 2015

Open SharePoint List Items in Edit Mode by Default

Requirement: Open SharePoint Task list items in Edit form directly instead of "Display form".

Solution:

  1. Go to your SharePoint task list, Click on Site settings gear, Choose "Edit page" 
  2. Add a script editor and place this code:

    jQuery to launch list items in Edit mode:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() 
    {
      //Change display form links to edit form links
      $('.ms-vb a[href*="listform.aspx"]').each(function(){
          var url = $(this).attr('href');
          url = url.replace("PageType=4", "PageType=6");
          $(this).attr('href', url);
      });
    });
    </script>
  3. Save and close!
Now, on clicking any task item link, you'll be taken into Edit form directly.






You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...