Pages

Thursday, December 6, 2018

Hide Nintex form fields via Custom CSS


Add this name "nf-hide-calculatedcolumn" in the CSS class from calculated field.


Add in this CSS code from Custom CSS Section.

.nf-hide-calculatedcolumn 
{
visibility:hidden;
}


All of your CSS related control will be hidden.


Monday, October 15, 2018

Microsoft Flow to Update Azure AD User's Mobile Number via Custom Graph API App


Issue: When Updating Azure AD User Mobile number via Microsoft flow then we are getting error is Graph API - Insufficient privileges to complete the operation.

Our Techie team breaking head for few days and resolved issue and found solution.

Solution: Create Custom App for Graph API then Create HTTP Web service call inside flow to access Custom Graph API to update Azure AD User Mobile Number.

Friday, September 7, 2018

Sharepoint 2013 Installation Error : Application Server Role, Web Server (IIS) Role : Configuration error

I got in the below error   while trying to install the pre-requisites of sharepoint 2013 on the windows server 2012 R2 OS,

• Application Server Role, Web Server (IIS) Role: configuration error

The tool was unable to install ApplicationServer Role, Web Server (IIS) Role.

I tried to add role via Power shell command, still that Sharepoint 2013 Pre Requiste file is not passed.
we break head and we spent three days trying to figure out this issue and finally we found solution into %WINDIR% to find my solution

The Solution is:
The installer is trying to run the executable C:\Windows\System32\ServerManagerCMD.exe
 Taking a look in the system32 directory, you’ll see that in R2, ServerManagerCMD.exe doesn’t exist! How do we fix that? We do the logical thing. Take ServerManager.exe, copy it, and rename it to ServerManagerCMD.exe. Who cares if it’s messy, it works. :

Now, Run the Sharepoint Pre Requeste Installer:




Friday, August 17, 2018

Sharepoint 2013 or Online Enter date picker in the data sheet view scrolls form to the top of the Page

When you create data sheet view with Date field and put in the Sharepoint Dash board page.

Users are trying to enter or change Date from Data Sheet view in the Chrome Browser.

Once User Clicked on the Date field, it will jump into the top of the page.

Users always facing difficult to enter Date field.

This is happening when using not -IE browsers.

If you use IE browser then there is no issue.

Find in the following work around code.

1. Open the Sharepoint Page.
2.Edit Page.
3.Add Script Editor web part and script tag begin and end.
4.Add the following code in the Script Editor.
5. Publish the page.

ExecuteOrDelayUntilScriptLoaded(
    function() {
        if (typeof(window.original_OnIframeLoadFinish) !== 'function') {
            window.original_OnIframeLoadFinish = window.OnIframeLoadFinish;
            window.OnIframeLoadFinish = function() {
                original_OnIframeLoadFinish.apply(this, arguments);
                window.Picker.contentWindow.original_setFocusDatepicker = window.Picker.contentWindow.setFocusDatepicker;

                window.Picker.contentWindow.setFocusDatepicker = function() {
                    workspaceTop = document.getElementById('s4-workspace').scrollTop;
                    window.Picker.contentWindow.original_setFocusDatepicker.apply(this, arguments);
                    document.getElementById('s4-workspace').scrollTop = workspaceTop;
                }
            }
        }
    }, "datepicker.js");

Thursday, August 16, 2018

Sharepoint User Profile Service stop via STSADM cmd




1.stsadm -o enumservices > c:\services.txt - Those gave me a list of services and showed me what the name of the service I need to stop is.

2.  stsadm -o provisionservice  -action stop -servicetype "Microsoft.Office.Server.Administration.ProfileSynchronizationService, Microsoft.Office.Server.UserProfiles, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" -servicename FIMSynchronizationService

Once you stopped User Profile Sync Service then you can check

Services --> FIM Sync Server
Sharepoint Central Admin Service --> User Profile Sync Service - Stopped

you just restart to User Profile Sync Service via Sharepoint Central and start Full Sharepoint Sync.

Monday, July 30, 2018

Deploy Sharepoint 2013 Solution Package(WSP Packages) using powershell

Add WSP Solution

Add-SPSolution -LiteralPath "C:\DeployLDACPCustom\LDAPCPCustom.wsp"

Install-SPSolution -Identity "LDAPCPCustom.wsp" -GACDeployment


Install-SPFeature -path "LDAPCPCustom" -CompatibilityLevel 15


Enable-SPFeature -identity "LDAPCPCustom" -URL http://test:30000/

Update Solution Package

Update-SPSolution -GACDeployment -Identity "LDAPCP.wsp" -LiteralPath "C:\DeployLDACP\LDAPCP.wsp"

Remove WSP

De activate feature by manually in the site URL

Disable-SPFeature -identity "LDAPCP.Custom"

Uninstall-SPSolution -Identity "LDAPCPCustom.wsp"

Remove-SPSolution -Identity "LDAPCPCustom.wsp"

Thursday, May 3, 2018

Save site as template in SharePoint Online or Sharepoint Site

To Save the site as a template you can follow this steps.
  1. Open your the site with SharePoint Designer
  2. In the ribbon go to Site Options
  3. Locate the option SaveSiteAsTemplateEnabled and modify the value to true
  4. Since the site template is disabled in the Publishing sites the option Save Site as Template is not available in the Site Settings you will need to navigate to the page directly: http://yourdomain.sharepoint.com/_layouts/savetmpl.aspx Provide all the details and click OK after a couple of minutes you will have the WSP site template generated
Note: If you have apps downloaded from the store they could prevent you to save the site as a template if you are facing this scenario you will need to uninstall the apps first.
Create a site based on the template will require a similar environment this means that you will need to have the same features installed and activated in the site collection where you want to install the template.
In this article you can find more information about how to activate the features. Save Publishing Site as template
If you have custom page layouts applied to your site site you might loose the access to the pages with them applied after creating the site based on the template.
If you face this issue you can follow this article to fix it Fix publishing pages with custom page layouts created from template

Monday, March 19, 2018

Apply Custom CSS to Sharepoint List View Webpart Pages

Apply in the below code to Script Editor web part or Content Editor Webpart in your list view sharepoint pages.

Add Style Tag begin and end in the following code:

Method 1:


 /* ---------- Table Rows ----------*/
    /* Set background for every row */
    .ms-listviewtable > tbody > tr {
        background: white;
    }

    /* Set border for every row */
    .ms-listviewtable > tbody > tr td{
        border-bottom: 1px solid #AFAFAF !important; /* !important needed over override SharePoint inline style */
        border-left: 1px solid #AFAFAF !important;
        border-right: 1px solid #AFAFAF !important;
    }

    /* Set background for every alternating row */
    .ms-listviewtable > tbody > tr.ms-alternating {
        background: #E2E3E5;
    }

    /* ---------- Table Header Row ----------*/
    /* Remove background set in SharePoint's general data table style */
    .ms-listviewtable tr.ms-viewheadertr {
        background: transparent;
    }

    /* Modify background color */
    tr.ms-viewheadertr > th.ms-vh-icon, /* Input box and attachment icon */
    tr.ms-viewheadertr > th.ms-vh, /* Text */
    tr.ms-viewheadertr > th.ms-vh2,
    tr.ms-viewheadertr > th /* Text */ {
        background: #2E4C70;
    }

    /* Modify background color on hover */
    tr.ms-viewheadertr > th.ms-vh:hover,
    tr.ms-viewheadertr > th.ms-vh2:hover,
    tr.ms-viewheadertr > th  {
        background-color: #273C51;
        border-color: #273C51;
    }

    /* Modify font color */
    .ms-viewheadertr a,
    .ms-viewheadertr div {
        color: white;
    }

    /* Modify font color on hover */
    .ms-viewheadertr a:hover,
    .ms-viewheadertr div:hover {
        color: white;
    }
    tr.ms-viewheadertr > th.ms-vh-icon:last-child {
        display:none;
    }



Method 2:

/* Modify font color */
    .ms-viewheadertr a {
color:White;
    }
    .ms-viewheadertr div {
        color: Blue;
    }

    /* Modify font color on hover */
    .ms-viewheadertr a:hover{
color: White;
}
    .ms-viewheadertr div:hover {
        color: #F36F21;
    }
tr.ms-viewheadertr > th /* Text */ {
        background: #034EA2;
    }
 tr.ms-viewheadertr > th  {
        background-color: #034EA2;
        border-color: #034EA2;
    }

li[text="Alert me"] {display:none;}

Screens:


Wednesday, March 7, 2018

Scheduled workflows and the Nintex Site Workflow Scheduler timer job

If Nintex Site workflow is not running or trigger by automatically, you need to follow in the below steps:

The Nintex Workflow Scheduler job should only have one instance listed in the Timer Job Definitions page.  To check, please go to Central AdministrationMonitoring Timer Jobs Review job definitions.  Scroll through until you locate Nintex Workflow Scheduler.  There should be only one instance there.  If there are more, all but one will need to be deleted, ensuring the one that is left is on a web application on a server running the “Microsoft SharePoint Foundation Web Application” service.


To change this, the NWAdmin.exe 
InstallTimerJob and UninstallTimerJob operations can be used to bind the timer job to a Web application running the Microsoft SharePoint Foundation Web Application service.  Doing this will ensure SharePoint executes scheduled workflows on a web front end servers, so any content web application running the web application service will do (only one per farm).

The nwadmin.exe command line tool is used.  Full information here NWAdmin Operations - Nintex Workflow 2010

Please type (do not copy and paste) these commands:
1.      NWAdmin.exe -o UninstallTimerJob -job ScheduledWorkflows
    (Use above line if it is currently installed on Central Admin Web App, if not specify what Web App to remove it from using -url switch)

Then:

2.      NWAdmin.exe -o InstallTimerJob -job ScheduledWorkflows -url http://yourwebappurl/

Naturally, you will need to replace http://yourwebappurl/ with the real URL of the relevant web application you choose to install it on.

NOTE: Only scheduled workflows use the Nintex Workflow Scheduler service.  Any regular workflow is run at first by the "w3wp.exe" service and once having been "put to sleep", then after by "owstimer.exe", the SharePoint Timer service.  Moving the Nintex Workflow Scheduler will not interfere with regular workflows at all.  

Install, Uninstall and reinstall can be done during business hours, there is no resets, down-time or any impact to workflows.  The timer job will pickup where it left off after reinstall and run any schedules that were missed during reinstall. 

Screens:




How do I delete columns that workflows create in a sharepoint list

Here is what you should do:
1. Get SharePoint Manager from Codeplex, if you've not already. It's a freeware with very useful feature for people like us. you can download it.
2. Run SharePoint Manager as Administrator 
3. Under the site -> List -> Fields, change the property of Workflow field Allow Deletion True
4. Open the site in SPD, Edit List coulmns, Show Read Only columns & finally delete.
Sharepoint Manager Screen:


Sharepoint Designer

Thursday, February 22, 2018

Remove-SPODeletedSite - Sharepoint Online site from Recycle bin


1.Connect Sharepoint Online via SPO Service

Connect-SPOService -Url https://TenantName-admin.sharepoint.com/

Example:

Go to your Sharepoint Admin center and copy URL

Connect-SPOService -Url https://LiveSolution-admin.sharepoint.com/

2. Enter Login Credentials.

3.Execute this command and Enter Y

Remove-SPODeletedSite -Identity https://LiveSolution.sharepoint.com/sites/Testing

Site will be removed immediately from Recycle Bin.

Tuesday, January 23, 2018

All Power shell Backup Commands for SharePoint Site


Backup Site Collection

Backup -SPSite http://spuat/sites/SG -Path C:\Backup\SGSite.bak

Restore Site Collection

Restore-SPSite http://spuat:222/sites/SG  -Path C:\Backup\SGSite.bak -Force

Monday, January 8, 2018

Truncate WSS_Logging MDF and LDF database in the Sharepoint Server

we try to access our SharePoint site and notice that site does not load and instead throws an error. 
we investigate the error and find out that it has something to do with the WSS_Logging database when check WSS_LOGGIN MDF file size has more than 100 GB out of 120 GB Disk space. 
It is a common problem and If you are facing this type of issue, truncate your WSS_Logging DB and you should be follow in the below steps:

1.       Open your SQL UI. Right click WSS_Logging DB and go to Reports > Disk Usage OR Reports > Standard Reports > Disk Usage.

Figure 1: Disk Usage

2.       In the disk usage report, expand the second node to see current disk usage. It should be full.



3.       Right-click WSS_Logging B and select “New Query” and paste the following script in the window and then hit F5 to execute it. NOTE: This script was copied from the following link:


Script:

·         DECLARE @TableName AS VARCHAR(MAX)
DECLARE table_cursor CURSOR
FOR
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME LIKE '%_Partition%'
OPEN table_cursor
FETCH NEXT FROM table_cursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @SQLText AS NVARCHAR(4000)

SET @SQLText = 'TRUNCATE TABLE ' + @TableName

EXEC sp_executeSQL @SQLText

FETCH NEXT FROM table_cursor INTO @TableName
END
CLOSE table_cursor
DEALLOCATE table_cursor


Different people have written different scripts to truncate the table. This one is a tested solution and works perfectly.

4.       After executing the query, go back to the disk usage report and now you should see that the database is empty. Open your SharePoint site and it should work.


After that we shrink MDF files from SQL Server management studio then WSS Logging MDF files has reduced disk size and which is working fine and tested in my environment.