Translate

Tuesday, April 7, 2015

Use SPServices in Nintex Form


Below are  the steps given to use famous jQuery SPServices in Nintex Forms

1. Open the minified SPServices file, in my case it is jquery.SPServices-2014.02.min.
2. Scroll down to the end of the file where you will see a line,
 
    return aK.test(ao(aM)[i.method](i.property))}})(jQuery);

3. Replace the term jQuery to NWF$
4. Save as the file in different name, NWF.min
5. Now upload the file to a SharePoint library and refer it in Nintex Form
6. Open Nintex Form settings, expand Advanced, and paste the url in "Custom Javascript Includes" section.
7. Expand Custom javascript and paste the below code.
   
           NWF$(document).ready(function(){
                 console.log(NWF$().SPServices.Version());
           });

8. Hit F12 and Preview the form.
9. If all the steps are followed, you can see the version of the SPServices file, in my case LOG: 2014.02 in the console.

Hope this helps. Cheers !

Wednesday, March 18, 2015

InfoPath Form Multiline Text published as Single Line of Text on Form Library

You have Multi line textbox on your InfoPath Form and after you published it, you noticed that your data is truncated on the library view and the field is published as Single Line of Text.

This is a known issue for Microsoft and looks like it is not yet fixed or won't be fixed. There is no solution to this, however, there are two workarounds which I can think of -
Option 1) 
Create a Multi line Textbox and if not required, uncheck the richtext options and publish the form.
Option 2) 
a) Publish the form library and if it is single line of text then create a Multi line text field on the form library.
b) Select Allow unlimited length while creating the column.
c) Go to the form publishing wizard, and on the field promotion, Select the field which you promoted, hit modify, and then map it with your new multiline field create on your library.
d) Now all your data is mapped to this new field, so you won't loose any record.
Cheers :) !

Thursday, July 17, 2014

sideloading of apps is not enabled on this site : sharepoint online

Are you developing Apps for SharePoint 2013 on a non developer site ? There is a new site template available for developers to develop their apps and test them on a Developer Site Template. You should use Developer site template to develop and test your apps.
If you are trying to deploy your app on a non developer site then you would receive an error "side loading of apps is not enabled on this site SharePoint online".

Side Loading is a hidden feature  which should be enabled on the site to deploy your app. By default this feature is not enabled on any non developer site, so when Visual Studio tries to deploy your app, VS checks if side loading is enabled.
VS calls a method Microsoft.SharePoint.Client.AppCatalog.IsAppSideloadingEnabled and it returns FALLS if it is not a developer site template. However, this hidden feature can be enabled by using Power Shell. Please follow the below MSDN link which explains how to enable them.
http://blogs.msdn.com/b/officeapps/archive/2013/12/10/enable-app-sideloading-in-your-non-developer-site-collection.aspx

Remember side loading of apps is not secure on production sites. It has potential risk of unwanted apps to get added in your site. So never turn on this feature on a production site.


Thursday, January 16, 2014

SharePoint Developer Dashboard


SharePoint 2010 has introduced a cool tool for developers to troubleshoot performance issues, the Developer Dashboard. By default the tool is disabled on SharePoint 2010. You can use stsadm or powershell scripts to enable or disable the tool.

Powershell to Enable Developer Tool

Execute the below powershell script to enable Developer Dashboard on your environment.

$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
$addsetting.Update()

It displays the output window at the bottom after the page loads.

OnDemand Developer Tool

$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$addsetting.Update()

On Demand enables a small button to make it available when needed.

Disable Developer Tool

Execute the below script to disable the tool.

$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$addsetting.Update()



Tuesday, December 10, 2013

The expected version of the product was not found on the system


Are you trying to install any cummuliative update on SharePoint and receiving error "The expected version of the product was not found on the system". This is because you are missing some patches which are required before you install the update. You can open Central Admin and navigate to "Check product and patch installation status" page and check for missing patches. Alternatively, if you don't want to do the check and just want to install it, open command prompt and run the below command. Cheers !

packagename.exe PACKAGE.BYPASS.DETECTION.CHECK=1

Wednesday, November 27, 2013

Start/Stop SharePoint Services using Powershell

Are you supporting SharePoint servers ? and you have multiple front end servers ? Do you need to stop the SharePoint services and restart them ? Below are the two powershell scripts which will do it for you. You don't have to go to services.msc identify the services and manually stop and restart them. Just use the scripts below. Cheers !

** If you dont want to stop/start the world wide services please remove W3SVC.

Stop Services

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

function StopServices(){
$services = @("SPAdminV4","SPTimerV4", "SPTraceV4","SPUserCodeV4","SPWriterV4","SPSearch4","W3SVC","OSearch14");

#Stop Windows Services
foreach($service in $services){
Stop-Service $service
$stoppedService = Get-Service $service
if($stoppedService.Status -eq "Stopped"){
Write-Message $service
}
}
}

function StopWebAnalytics(){
Get-SPServiceInstance |? {
if($_.TypeName -like "Web Analytics Data Processing Service"){
$_.UnProvision()
Write-Message "Web Analytics Data Processing Service"
}
}

Get-SPServiceInstance |? {
if($_.TypeName -like "Web Analytics Web Service"){
$_.UnProvision()
Write-Message "Web Analytics Web Service"
}
}
}

function StopIIS(){
Write-host "Stopping IIS";
iisreset /stop
}

function Write-Message([string]$serviceName){
Write-Host $number + "Successfully stopped service $serviceName"
}

StopServices
StopWebAnalytics

StopIIS

Start Services

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

function StartServices(){
$services = @("SPAdminV4","SPTimerV4", "SPTraceV4","SPUserCodeV4","SPWriterV4","W3SVC","OSearch14");

#Start Windows Services
foreach($service in $services){

Start-Service $service
$StartedService = Get-Service $service
if($StartedService.Status -eq "Running"){
Write-Message $service
}
}
}

function StartWebAnalytics(){
Get-SPServiceInstance |? {
if($_.TypeName -like "Web Analytics Data Processing Service"){
$_.UnProvision()
Write-Message "Web Analytics Data Processing Service"
}
}

Get-SPServiceInstance |? {
if($_.TypeName -like "Web Analytics Web Service"){
$_.UnProvision()
Write-Message "Web Analytics Web Service"
}
}
}

function Write-Message([string]$serviceName){
Write-Host $number + "Successfully Started service $serviceName"
}

StartServices

StartWebAnalytics