Open List attachments in new tab/window

Hello Floks,

Recently one my client is looking for solution in which all the list item attachment should be open in new tab or window as they have compare more than one files simultaneously.

There is a very easy solution to make it feasible. Open you List Edit/Disp Form and add below JavaScript inside it.

 $('#idAttachmentsTable a').attr('onclick','');
 $('#idAttachmentsTable a').attr('target','_blank');

Above code remove On Click event from all of the list attachment and add target as blank.

Enjoy.. 🙂 Happy Coading… 🙂 🙂

How to update DB Column

Using below query all table’s having Createdby and Updatedby column should be altered. You don’t need to fire query for each table.

SELECT
‘ALTER TABLE ‘ + TABLE_NAME
+ ‘ ALTER COLUMN Createdby varchar(50) go ‘ AS Createdby, ‘ALTER TABLE ‘ + TABLE_NAME
+ ‘ ALTER COLUMN Updatedby varchar(50) go ‘ AS Updatedby  + ‘;’
FROM INFORMATION_SCHEMA.TABLES

Invalid characters in SharePoint naming conventions

This article lists the characters that you cannot use in the following names in Microsoft SharePoint:

  • Site names
  • Folder name
  • Server names
  • File names

Site names, subsite names, or site group names

  • You cannot use the following characters anywhere in a site name, in a subsite name, or in a site or Active Directory group name:-
    • Tilde (~)
    • Number sign (#)
    • Percent (%)
    • Ampersand (&)
    • Asterisk (*)
    • Braces ({ })
    • Backslash (\)
    • Colon (:)
    • Angle brackets ([ ])
    • Question mark (?)
    • Slash (/)
    • Plus sign (+)
    • Pipe (|)
    • Quotation mark (“)
  • You cannot start a site name, a subsite name, or a site group name with an underscore (_) character or with the period (.) character.
  • When you create a site name, a subsite name, or a site group name, you cannot use strings that were already used to name managed paths.
  • You cannot use the period character consecutively in the middle of a site name, a subsite name, or a site group name.
  • You cannot use the period character at the end of a site name, a subsite name, or a site group name.

Folder names

  • You cannot use the following characters anywhere in a folder name or a server name:
    • Tilde
    • Number sign
    • Percent
    • Ampersand
    • Asterisk
    • Braces
    • Backslash
    • Colon
    • Angle brackets
    • Question mark
    • Slash
    • Pipe
    • Quotation mark
  • You cannot use the period character consecutively in the middle of a folder name.
  • You cannot use the period character at the end of a folder name.
  • You cannot start a folder name with a period character.

File names

  • You cannot use the following characters anywhere in a file name:
    • Tilde
    • Number sign
    • Percent
    • Ampersand
    • Asterisk
    • Braces
    • Backslash
    • Colon
    • Angle brackets
    • Question mark
    • Slash
    • Pipe
    • Quotation mark
  • You cannot use the period character consecutively in the middle of a file name.
  • You cannot use the period character at the end of a file name.
  • You cannot start a file name by using the period character.
  • In addition, file names and folder names may not end with any of the following strings:
    • .files
    • _files
    • -Dateien
    • _fichiers
    • _bestanden
    • _file
    • _archivos
    • -filer
    • _tiedostot
    • _pliki
    • _soubory
    • _elemei
    • _ficheiros
    • _arquivos
    • _dosyalar
    • _datoteke
    • _fitxers
    • _failid
    • _fails
    • _bylos
    • _fajlovi
    • _fitxategiak

Configure SSL for SharePoint 2013

Access SharePoint site using custom URL

sharepoint2013admin

In this tutorial I will show you how to configure SSL for SharePoint 2013.

Prerequisites:

  1. IIS 8
  2. SharePoint 2013
  3. Windows Server 2012
  4. HTTP Web Application on Port 80

Steps:

  1. Create Self Signed Certificate on IIS 8
  2. Import Self Signed Certificate to SharePoint Certificate store
  3. Add Self Signed Certificate to trust management in Central Administration
  4. Configure IIS Binding
  5. Configure AAM
  6. Notes
  7. Issues

Note: Make sure to perform these steps with admin privileges.

Step 1Create Self Signed Certificate on IIS 8

Open IIS Manager and then go to Server name and choose IIS Section “Server Certificates

1

 

Click on Create Self-Signed Certificate… on Actions pane

Specify a name like “SharePointSelfSignedCert” and click Ok

2

 

Double click on this created Certificate and go to details Tab and click copy to File…

3

 

Click Next (Welcome…),

Select No, do not export the private key and…

View original post 290 more words

Generate script for ALTER DB column Data for all tables available in DB

Run Below query to generate script:

SELECT
'ALTER TABLE ' + TABLE_NAME + ' ALTER COLUMN Createdby varchar(50) ;' +
'ALTER TABLE ' + TABLE_NAME + ' ALTER COLUMN Updatedby varchar(50) ;' AS Script
FROM INFORMATION_SCHEMA.TABLES

Take care of following items:

  • Above query generate scripts for all the tables which were created in that database, deleted tables are also included in it.
  • If tables contains that field or not it will generate script for that table also. Manually you have to remove that table script to run the generated scripts.
  • CreatedBy and UpdatedBy is the field name of the tables which I want to update.
  • Above query generates script for 2 fields, if you want to increase or decrease you have to update above query as per your requirement.