Tuesday, October 18, 2016

SharePoint Designer 2010 workflow on the specific folder of library

SharePoint Workflow could not be associated with folder, but you could create a List Workflow and specify the following condition to verify if item is located under a folder named Test/ Orders:
CurrentItem:Path ends with Test
enter image description here

Friday, August 26, 2016

SharePoint 2013 Interview Questions and Answers

Q1: Can you deploy .wsp Solutions from SharePoint 2010 in SharePoint 2013?Ans: Yes. SharePoint 2013 provides Support for both 14 Hive and 15 Hive. Solutions from SharePoint 2010 can be deployed in SharePoint 2013 either in 14 Hive,15 Hive or both. This can be done using the new “CompatabilityLevel” parameter of Install-SPSolution cmdlet with which you can now Deploy your wsp Solutions to 14 hive, 15 hive or both. For more Info see DEPLOY SHAREPOINT 2010 SOLUTIONS IN SHAREPOINT 2013

 Q2: Can you Create & Deploy Sandbox Solutions in SharePoint 2013?
Ans: 
Sandbox Solutions are depreciated in SharePoint 2013.You can still Create them and deploy them but they are not supported by Microsoft (not 100% sure about this though).


Q3: What is the new JS Link Property on SPField?
Ans: New “SPField.JSLink” property has been added to help specify any external JavaScript file Containing any Rendering logic for Out-of-Box or Custom field type.With JSLink developers can now Control the Rendering (the presentation and validation) of any Field (Custom or Out-of-box) on List forms as well as in Views by simply adding a reference to an External or deployed JavaScript file.


Q4: Whats are the new Delegate Controls in SharePoint 2013?
Ans: 
In SharePoint 2013, three New Delegate Controls have been Introduced for the purpose of displaying the new Top Suite bar (with links SkyDrive, NewsFeed,Sync,follow). These Controls are -

  • SuiteBarBrandingDelegate delegate Control
  • SuiteLinksDelegate delegate Control
  • PromotedActions Delegate Control
Q5: What are the Changes in CSOM and REST based APIs?
Ans:  Microsoft has improved both Client Side Object Model (CSOM) and Representational State Transfer (REST) based APIs by adding a much needed support for the Search, User Profiles, Taxonomies, and Publishing Object Model.Client.svc service is extended with REST capabilities and accepts HTTP GET, PUT, POST requests.


Q6: What’s the new App model?
Ans:
 SharePoint 2013 Introduces a Cloud App Model that enables you to Create apps.Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Q7: What is the new SPSecurityEventReceiver?
Ans:  SharePoint 2013 Introduces a Cloud App Model that enables you to Create apps.Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Q8: What's new Mobility Feature in SharePoint 2013?
Ans: With the new mobility features in SharePoint 2013, you can create SharePoint powered mobile applications for Windows Phone using the new SharePoint phone application wizard template in Visual Studio. You can integrate new features introduced in SharePoint 2013, such as the Geolocation field type and “push" notifications from SharePoint Server, into your mobile applications.

Q9: What are new Apps for SharePoint?
Ans: SharePoint 2013 introduces a Cloud App Model that enables you to create apps. Apps for SharePoint are self - contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Q10: Q46: What are Callout Popups in SharePoint 2013.
Ans:
 Similar to Dialog framework in SharePoint 2010, Microsoft has added a new Callout Popup framework to Create Hover Popups that you know as Preview Windows as well. These Notification\Tooltip\Help (whatever you call it..) Callout Popups can be fully Customized to add Custom Text & Actions for guiding End-users.For more details see The new Hover Over\Preview\Callout Popups in SharePoint 2013.

Q11: Is Callout Popups a replacement to Dialogs in SharePoint 2013.
Ans:
 No. Dialog Framework still exists.

Q12: Can we view PDF files in Callout Popups?
Ans:
 Yes. A Custom Result type and Display template would be needed.

Q13: Are there any Changes to Solutions deployed in \bin directory and GAC in SharePoint 2013?
Ans:
 You can no longer add partial trust Solution Packages to the \bin directory.Any files deployed to the \bin directory must be full trust. Any deployment scripts needs to be updated to make sure that they specify the correct trust level. After the release of .NET Framework 4.0, the GAC was split into two, one for each CLR.
c:\windows\assembly is the location for .NET versions 1.0 through 3.5 and c:\windows\microsoft.net\assembly is location for all the dlls for project Created in .NET Framework 4.0.

 Q14: How are Sandbox Solution Migrated in SharePoint 2013?
Ans:
 Sandbox Solutions are upgraded with the Content databases.

Q15: What’s new with Visual WebPart in SharePoint 2013?
Ans:
 A new Visual WebPart Template has been added to Visual Studio 2012 for Creating Visual Webparts for SharePoint 2013. In this new Template both the User Control and WebPart Classes are merged to Create one template unlike SharePoint 2010 where you had a separate ascx and webpart file.Also, now you can Create both Sandbox and Farm solutions using Visual WebPart Template.

Q16: What’s the new TilesViewWebPart in SharePoint 2013?
Ans:
 SharePoint 2013 Introduces a new “Getting Started” WebPart that has “Tiles” to provide an easy access to some of the main links in the Site like – adding lists\libraries,Creating masterpage etc.To Programmatically Create this new WebPart a new abstract base class TilesViewWebPart has been added in SharePoint API.You have to Create a Custom Webpart and Inherit from TilesViewWebpart and Override GetTiles() to Create Custom tiles.



http://sharepointontop.blogspot.com/2013/03/sharepoint-2013-development-interview.html

Thursday, August 25, 2016

SharePoint Server 2016 Installation step by step



Captured from the below URL
http://mstechtalk.com/sharepoint-server-2016-installation-step-by-step/
http://mosshowto.blogspot.com/2015/10/sharepoint-2016-installation.html

________________________________________________________________________________
SharePoint Server 2016 Preview has been released earlier today, check my previous post for Download and Product Key details, installation media is available for a trial period of 180 days.
I have completed a Single-Server installation of SharePoint Server 2016 with Database server on a separate machine. I am sharing the installation details here which can be helpful for many who are new to SharePoint. The installation is similar to the older versions of SharePoint except MinRoleTopolgy which is introduced for the first time in SharePoint 2016.

System Requirement

I have used the below hardware and software configuration form my current installation.

Hardware Requirement

ScenarioProcessorRAMHard disk
Database Server64-bit, 4 cores8-24 GB80 GB for system drive100 GB for second drive and additional drives
SharePoint Server64-bit, 4 cores8-12 GB80 GB for system drive80 GB for second drive
Software Details:
ServerOSInstallation media
Database ServerWindows Server 2012 R2 – with latest updatesSQL Server 2014 with SP1 – x64
SharePoint ServerWindows Server 2012 R2 – with latest updatesSharePoint Server 2016 Preview

 SharePoint Server 2016 Preview installer

Open the SharePoint Server 2016 Preview installer file from SharePoint 2016 setup which will look like the below:
SharePoint Server 2016 - Installation Screen
Prerequisites Installation
You need to install software prerequisites first before the installation of SharePoint Server 2016, the prerequisites installation can ask for restart multiple time. Start the prerequisites installation as shown below:
SharePoint Server 2016 - Preparation Tool
On next page, you can view the license agreement which you have to accept if you want install, you have to accept it as you having no other choice. Prerequisites installation will take some and will also ask for restart. After restart, re-run the installer file and run prerequisites, this will again ask for agree on terms. Again continue it and wait for the installer to complete prerequisites.
SharePoint Server 2016 - Preparation Tool install wizard
After completion, you can see the installation status. Installation status in my machine is listed below, all installed successfully except .NET framework.
  • Application Server Role, Web Server (IIS) Role: configured successfully
  • Microsoft SQL Server 2012 Native Client: was already installed (no action taken)
  • Microsoft ODBC Driver 11 for SQL Server: installed successfully
  • Microsoft Sync Framework Runtime v1.0 SP1 (x64): installed successfully
  • Windows Server AppFabric: installed successfully
  • Microsoft Identity Extensions: installed successfully
  • Microsoft Information Protection and Control Client 2.1: installed successfully
  • Microsoft WCF Data Services 5.6: installed successfully
  • Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763): installed successfully
  • Microsoft .NET Framework 4.5.2: was already installed (no action taken)
  • Update for Microsoft .NET Framework to disable RC4 in Transport Layer Security (KB2898850): installation error
  • Visual C++ Redistributable Package for Visual Studio 2013: installed successfully
SharePoint Server 2016 - Preparation Tool restart
I have restarted the machine as it was asking to restart, as you have noticed the one installation error “Microsoft .NET Framework to disable RC4 in Transport Layer Security, you need to install the security update for .net framework”.
The error patch description is “A security issue has been identified that could allow an unauthenticated remote attacker to compromise your system and gain access to information”
So you can download the security patch from Microsoft Download Center through this URLhttp://www.microsoft.com/en-us/download/details.aspx?id=42883
SharePoint Server 2016 - Preparation Tool installation complete
After installation, run the perquisites again and now you can see the issue is resolved. And we are good to install SharePoint 2016.

SharePoint Server 2016 Installation

Now after the perquisites installation, click on the SharePoint Server 2016 installation link to start the installation. Setup will first prepare the installation files and verify prerequisites and then will start the installation.
On first screen you will be prompt for the Product Key, you can enter key “NQTMW-K63MQ-39G6H-B2CH9-FRDWJ” for SharePoint Server 2016 Preview release.
SharePoint Server 2016 - Product Key
Once again you have to accept the license terms :)
SharePoint Server 2016 - License Terms
Choose the file location for SharePoint server and search server files. Search index files will be stored in local hard drive which can be very large so make sure that there is sufficient free space in selected drive. I will recommend you to use a separate drive for search index and default drive for SharePoint files.
SharePoint Server 2016 - File Location
Click on install now button to start the installation. The installation will take a few minutes to complete, in below image you can see the complete installation status, you can select the check box the start configuration wizard after the installation or you can manually start the configuration wizard.
SharePoint Server 2016 - Installation Wizard completed
SharePoint Product Configuration Wizard
The configuration wizard will start a welcome screen, press next to continue. The following services may have to be started or reset during configuration:
  • Internet Information Services
  • SharePoint Administration Service
  • SharePoint Timer Service
So choose yes to restart the services if required and continue with the configuration wizard.
SharePoint Server 2016 - Configuration Wizard Started
Select Create a new server farm option from the next step as shown in below screen, if you are already have installed a new farm and doing a MinRole installation then select the first option to connect to an existing server farm.
SharePoint Server 2016 - Configuration Wizard Connect Server Farm
Enter the database server details and database access account details, use a separate user for this but I am using the same SPAdmin user for the preview installation. I have assigned it below rights in DB server:
  • Dbcreator
  • SecurityAdmin
  • SysAdmin
SharePoint Server 2016 - Configuration Wizard Database Settings
If you are facing issues in connecting to SQL Server then make sure TCP/IP is enabled in SQL Server Configuration Manager. If you still getting the error then turn off the firewall on SQL server machine.
SQL Server 2014 - Configuration Manager

After completing the database settings, press next which will take to you on Farm security settings page. Enter passphrase here which is required to secure the farm configuration data and is required for each server that joins the farm.
SharePoint Server 2016 - Configuration Wizard Passphrase
Server Roles or the MinRoletopology
Here comes the MinRoles, SharePoint Server 2016 has six types of server roles:
  • Front-end
  • Application
  • Distributed Cache
  • Search
  • Custom
  • Single-Server Farm
You can either select single-server farm or can do a multi-server installation using MinRolestopology. If you have selected Single-Server Farm then you cannot extend to Multi-Server environment, so if you plan to extend to multi-Server farm in future then select the Custom MinRole or Application.
I am using single-server farm installation so will go with the last option.
SharePoint Server 2016 - Configuration Wizard MinRoles
On next screen, you can specify port for Central Admin or can use the default which is selected randomly. I have never used the default port, I always an easy one which I can remember like 5555. Select NTLM installation mode at this phase and press next.
SharePoint Server 2016 - Configuration Central Administration Web Application
Verify the settings in configuration wizar, press next to start the wizard. Advance option is not enabled for Single-Server installation.
SharePoint Server 2016 - Configuration Wizard Completed
Press Next button, it will start the configuration of SharePoint farm. This is similar to what we do in past with MOSS 2007, SharePoint 2010 and SharePoint 2013 or even with SharePoint Foundation which is no more part of SharePoint 2016.
SharePoint Server 2016 - Configuration Product Wizard
The wizard can take some time and if you get some errors then you have to verify the roles of the user in SQL Server. If everything went smooth then if will finish successfully then it means having a good day otherwise some more effort required :)
Being a SharePoint MVP, I am quite lucky to install it without any hurdle.
SharePoint Server 2016 - Product Configuration Successful
So now, happy time for me to do some SharePointing on SharePoint Server 2016. After the installation, run the services wizard from Central Administration, setup will take you to the service configuration wizard page, you can either configure them through wizard and can also configure them manually.
SharePoint Server 2016 - Service Configuration Wizard
As this is test environment, so I will prefer configuring services using wizard. We can define a separate account for services but I am using the same SharePoint Admin account for all services.
SharePoint Server 2016 - Service Configuration Wizard Page
This will complete the services wizard for me and now I am ready to explore SharePoint.
SharePoint Server 2016 - Central Administration Home
Below you can see the central administration page from my machine, and yes there are many new features in 2016, in below screen you can see one of them related to configure hybrid OneDrive and Site features underOffice 365.
Keep visiting MSTechTalk.com, I will also share the hosted environment details so you can able to test the hosted preview of SharePoint Server 2016.

Thursday, August 11, 2016

Select ALL Items in Multiselection Listbox in Infopath 2010

The easiest method for accomplishing this will be the following:
  1. Open the list form template in InfoPath Designer.
  2. Go to File >> Publish >> Export as Source Files.  Choose a folder to save these to.
  3. In these source files you will see the template.xml file.  Open this in your favorite text editor.
  4. Search for the section in this XML file which contains the name of the Multiple-Selection List Box data.
Names may be different:
<my:multidefault_x0020_checkboxes>
    <Value>Apples</Value>
</my:multidefault_x0020_checkboxes>
Add the list of choices you would like to be checked by default, so it looks similar to this:
<my:multidefault_x0020_checkboxes>
    <Value>Apple</Value>
    <Value>Orange</Value>
    <Value>Grape</Value>
    <Value>Pear</Value>
    <Value>Etc</Value>
</my:multidefault_x0020_checkboxes>
Save this file and go back to the XSN's source files.  Right click on the manifest.xsf file and go to Design.  Quick Publish back to the server.
Test it out!  Let me know how it goes.

Wednesday, August 3, 2016

InfoPath - Multi Choice Value Field - Default Values

From the below article: https://social.msdn.microsoft.com/Forums/en-US/6d30678f-acfa-4b4d-bffc-2705de86c0c2/infopath-multi-choice-value-field-default-values?forum=sharepointcustomizationprevious
--------------------------------------------------------------------------

the default values set in the SharePoint list do not carry over into InfoPath.  Not to mention, there is no option to select multiple default values for the Multiple-Selection List Box control within InfoPath.  The good news is we can make InfoPath display these values by default by modifying one of the source files that make up the InfoPath template.
When you first open an InfoPath XSN to fill in a new form, it uses a file called "template.xml" to know what data to display as default.  This file is stored in the source files that make up the XSN.  What we need to do is modify this file to include more than a single value as its default value.
The easiest method for accomplishing this will be the following:
  1. Open the list form template in InfoPath Designer.
  2. Go to File >> Publish >> Export as Source Files.  Choose a folder to save these to.
  3. In these source files you will see the template.xml file.  Open this in your favorite text editor.
  4. Search for the section in this XML file which contains the name of the Multiple-Selection List Box data.
Names may be different:
<my:multidefault_x0020_checkboxes>
    <Value>Apples</Value>
</my:multidefault_x0020_checkboxes>
Add the list of choices you would like to be checked by default, so it looks similar to this:
<my:multidefault_x0020_checkboxes>
    <Value>Apple</Value>
    <Value>Orange</Value>
    <Value>Grape</Value>
    <Value>Pear</Value>
    <Value>Etc</Value>
</my:multidefault_x0020_checkboxes>
Save this file and go back to the XSN's source files.  Right click on the manifest.xsf file and go to Design.  Quick Publish back to the server

Wednesday, July 27, 2016

Clear Cache for SharePoint desinger

Delete all files from the below locations.


%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

%APPDATA%\Microsoft\Web Server Extensions\Cache

The below location go to manually: 

%APPDATA%\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache





uninstall assemblies from GAC - Access Denied

On a SharePoint 2010 development server running Windows Server 2008 R2, I had to uninstall some assemblies in the GAC and keep getting access denied, when trying to delete them.
So, looking for at a way to do this, I had to change a Local Security Policy, in order to allow them to be deleted:
* Open Local Security Policy MMC
* Goto Security Settings -> Local Policies -> Security Options
* Locate “User Account Control: Run all administrators in Admin Approval” and change the setting from Enabled to Disabled
* Reboot and now the assemblies can be deleted
IMPORTANT! Never ever do this on a production system, and always turn it back on afterwards.

Tuesday, June 28, 2016

Unlock the SharePoint site using Powershell command

if your SharePoint site locked, then use the below Powershell command to unlock.

Note: Lock means your site will be disabled all actions (creating new item, library/list settings, limited site action menu etc.,) even if you are site collection administrator.

if you try to add another user as site collection administrator using powershell/central administrator, then will get the following error. this error because of SharePoint Lock.

Additions to this Web site have been blocked

To avoid above errors. use the below Powershell command

Set-SPSite http://SiteCollectionUrl -LockState Unlock

Wednesday, June 22, 2016

Open this task link missing in approval workflow+ sharepoint 2010

  1. Open up the Document List (or any list) from SharePoint Designer 2010
  2. Under the "Workflow" panel (lower right), click on "New" to create a new workflow (it will be shown as empty initially until you create a new one). Give a name to your workflow if prompted.
  3. You are now at the Workflow window. Click on "Edit workflow" under the "Customization" panel
  4. You are now at the Editor for the workflow. At the big horizontal cursor under "Step 1", type in "Start" and enter. It will then give you a list of possible actions you could add.
  5. Pick "Start Approval Process"
  6. A new line/item is added for "Start Approval process on current item with these people"
  7. Now click on "Approval" on the line (the underlined one)
  8. You are now at the Task Process level. Now, you could customize how the task is to be performed.
  9. Click on "Change the behavior of a single task"
  10. Under "When a Task is Pending", there are 2 Email task notification actions (e.g. "Email task notification to Current Task:Assigned To") and these actions is used to send the approval task emails, so we need to modify the emails by modify these actions. (so click on "Current Task: Assigned To")
  11. You are now in the Define E-mail Message window. This is where you define what the notifications should look like.
  12. Highlight the "Open this task" text, and click on the Hyperlink button (the last button on the right on the fourth row).
  13. You are now at the Hyperlink editing window. The "Display" field should says "Open this task"
  14. For the "Address" field, click on the "..." button to use the String Builder tool
  15. Click on "Add or Change Lookup" button
  16. In the "Data Source" dropdown, pick "Current Task: <name of the workflow name>"
  17. In the "Field from Source" dropdown, pick "Form_URN"  where condition ID=current list ID (OR) follow step  
  18. Click ... button behind the Address option, type following string in String builder.
    http://server/site/Lists/your task list/DispForm.aspx?ID=
    Then click Add or Change Lookup on the left button of the String builder, select ID field from Current Task data source.
    So the final string should similar like this:
    http://server/site/Lists/your task list/DispForm.aspx?ID=[%Current Task:ID%]
  19. Add the link to both 2 email task notification actions.
  20. Click all the "OK"s and back to the Editor window. The "Open this task" should now be a hyperlink to the Form URN.
  21. Go back to the Workflow Editing window (where you see the "Start Approval process on current item with these people" line), click on "these people" to define who should receive these notifications (standard procedure basically...)
  22. Now you could save it and publish it, and see how it works for you!