Friday, July 20, 2018

SharePoint '/_layouts/' locations

Some times you want to jump right to a specific system list, page or go to the edit mode in a SharePoint site. I wanted to list all the famous urls I used for the past years and ask you to tell me about any other ones you know to add it here in the list. Other have already contributed a bunch ðŸ™‚
(Remember for SharePoint 2013, 2016 you might want to add "15", "16" respectively after "/_layouts/" but if you don't SharePoint will take care of that for you) .. Also some of these are turned off on Office 365 SharePoint online.

Site collection level recycle bin:
/_layouts/15/AdminRecycleBin.aspx

Site level recycle bin (Added by Steve Stewart):
/_layouts/RecycleBin.aspx

Recreate default site sp groups (Added by Neal Bongers):
_layouts/15/permsetup.aspx

Load document tab initial (Added by Dominik Gempeler)
?InitialTabId=Ribbon.Document

Delete user from Site collection (on-premises) (Added by SamDavid):
/_layouts/15/people.aspx?MembershipGroupId=0

Display list in grid view. 'True' is case sensitive (Added by Antoine L.):
?ShowInGrid=True

Quick Launch settings page (Added by Ishani M.):
/_layouts/quiklnch.aspx

Navigation Settings page (Added by Abdur Raheem):
/_layouts/15/AreaNavigationSettings.aspx

Sandboxed Solution Gallery:
/_catalogs/solutions/Forms/AllItems.aspx

Workflow history hidden list:
/lists/Workflow History

Filter toolbar for Lists and libraries (Added by Asimaili):
?Filter=1
Site usage page (Added by @Dnyag):
/_layouts/usage.aspx

Site content and structure  page (Added by @Dnyag):
/_layouts/sitemanager.aspx

Site settings page (Added by Aowworld):
/_layouts/settings.aspx

View all site content page (Site content) (Added by Aowworld):
/_layouts/viewlsts.aspx

Manage site collection features - CASE SENSITIVE -  (Added by Vardhaman):
/_layouts/ManageFeatures.aspx?Scope=Site

Manage site features (Added by Vardhaman):
/_layouts/ManageFeatures.aspx

 Get the version of the SharePoint server (Patch level) (Added by: John Liu):
 /_vti_pvt/Service.cnf

Web Part Maintenance Page (Added by: Ricky):
?Contents=1

Show Page in Dialog View (Added by:Ricky):
?isdlg=1

Application page for registering SharePoint apps
/_layouts/15/appregnew.aspx

Save Site as a template
/_layouts/savetmpl.aspx

Sign in as a different user
/_layouts/closeConnection.aspx?loginasanotheruser=true

Enable SharePoint designer
/_layouts/SharePointDesignerSettings.aspx

Welcome Page (Default page settings)
/_layouts/AreaWelcomePage.aspx

Change Site Master Page
/_layouts/ChangeSiteMasterPage.aspx

Page Layouts and Site Templates
/_Layouts/AreaTemplateSettings.aspx

Master Pages library
/_catalogs/masterpage/Forms/AllItems.aspx

Quick Deploy List
Quick%20Deploy%20Items/AllItems.aspx
 
Open Page in Edit Mode
?ToolPaneView=2

Taxonomy Hidden List (MMS)
Lists/TaxonomyHiddenList/AllItems.aspx

User Information List:
 _catalogs/users
_catalogs/users/simple.aspx

Force displaying the user profile in the site
collection:
/_layouts/userdisp.aspx?id={UserID}&Force=True

Site hierarchy page (lists of sub sites) - (Added by community contributions)
/_layouts/vsubwebs.aspx
/_layouts/1033/vsubwebs.aspx



Thursday, July 19, 2018

WE CAN’T DO THAT FOR YOU BECAUSE THE FILE IS NO LONGER CHECKED OUT OR HAS BEEN DELETED IN SHAREPOINT DESIGNER

SCENARIO

In SharePoint Designer, When I tried to “Check In” a file inside, I got the below error:

WE CAN’T DO THAT FOR YOU BECAUSE THE FILE IS NO LONGER CHECKED OUT OR HAS BEEN DELETED

We can't do that for you because the file is no longer checked out or has been deleted
I already have tried to
  • Close Share Point Designer and restart it again,
  • Close SPD then clear cache from the following folder:
    • %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
    • %USERPROFILE%\AppData\Roaming\Microsoft\Web Server Extensions\Cache
Unfortunately, the “We can’t do that for you because the file is no longer checked out or has been deleted” still persists.

CAUSE

This problem might occur in case, the file title contains disallowed characters like “/” as shown below:
The file title contains disallowed characters in SharePoint Designer

SOLUTION

  • Right-click on the affected file >  Select “Edit file in advanced mode“.
Edit file in advanced mode in SharePoint Designer
  • Right-click again on the affected file > Select “properties“.
Open File Properties In SharePoint Designer
  • The properties page should be shown.
The file title contains disallowed characters in SharePoint Designer
  • Remove URL > Change the title to an appropriate name by avoiding using the disallowed characters.
master-page-properties-change-title-SharePoint-designer
The file should be now checked in properly.

Reference of this POST

Tuesday, July 10, 2018

REST API Compare Date Field

add following "toISOString()" that will allow you to check Date is >,<,>=,<=,!=

var today = new Date();
...$filter=StartDate ge  + today.toISOString() + and ...

Calculate Day in SharePoint

LastAction = '7 Apr 2018'
Created = '1 Apr 2018'

=DATEVALUE(TEXT(LastAction,"dd/mm/yyyy"))-DATEVALUE(TEXT(Created,"dd/mm/yyyy"))

OUTPUT
6

Tuesday, June 19, 2018

Remove duplicate through JQuery





 
    test1
     
 
 
    test2
     
 
 
    test1
     
 
 
    test2
     
 




var seen = {};
$('table tr').each(function() {
  var txt = $(this).text();
  if (seen[txt])
    $(this).remove();
  else
    seen[txt] = true;
});


Monday, April 9, 2018

Display User Profile Picture in SharePoint 2013 Site

Get the URL from the current user's profile via REST, the image tag used to display when the src is updated:
/_api/sp.userprofiles.peoplemanager/getmyproperties endpoint which returns PersonalUrl property, user profile picture could be requested via _layouts/15/userphoto.aspx?size=&accountname= page, where

size - could be set to S/M/L which stands for Small/Medium/Large image size
accountname - user account name

example : [src='/_layouts/15/userphoto.aspx?size=L&accountname=username@contoso.com' ]

Thursday, March 29, 2018

Only Numeric with Single Decimal - JavaScript


//Keypress event on a Class
$('.onlyNumeric').on('keypress', function(e) {
return isNumber(event, this);
   });

//Function to validate Number, Decimal and Negative sign
function isNumber(evt, element) {
        var charCode = (evt.which) ? evt.which : event.keyCode

        if (
            (charCode != 46 || $(element).val().indexOf('.') != -1) &&  
            (charCode < 48 || charCode > 57))
            return false;

        return true;
    }