Tuesday, October 28, 2014

The remote server returned an error (401) unauthorized sharepoint 2013

If you got the below error while developing a SharePoint hosted app:

The remote server returned an error (401) unauthorized.

Then try the below solution:

Add the below tag in web.config of your web application:

<appSettings>
        <add key="aspnet:AllowAnonymousImpersonation" value="false" />
</appSettings>

Hope it will work.


Monday, October 27, 2014

Set People Picker field to empty or blank in SharePoint designer workflow

Sometimes you need to set a people picker field value to empty in some condition in in SharePoint designer workflow.

Also check out:


I have a scenario like this:
I have a customized SharePoint InfoPath list form which contains a People picker field. Whenever user submit the form an email will trigger to the email id presented in the people picker. Now my requirement is to set the people picker blank once the email sent. So tried various solution like created a variable and set it to empty and then assign that variable to the people picker. Then created another people picker field and assign that people picker in the Set value to value action. This also did not work for me.

The solution which work for me is in the Set value to value (Set field in Current Item action), I did like Set EmailTo to [space]. Here space means a space without bracket.

Not sure whether it is correct approach or not, and if you have any better option then please Share with us.


Set Text field to empty or blank in SharePoint 2013 designer workflow

Here we will discuss how we can set text field value to empty in SharePoint 2013 designer workflow.

Here I was a very simple requirement, after sending one email in designer workflow I need to make a text field to empty in the workflow itself. There is an action available in SharePoint designer workflow name as "Set Field in Current Item". It is easy to set a field value with another field value using this action, but no direct way to set blank or empty in that action.

So here I created a local variable in the workflow with default value of empty and assign that variable to my text field.

Also check out:


To create a local variable click on the Local variable button in the Ribbon as shown in the fig below:


Then in the Workflow Local Variables dialogbox, click on Add and then give a name and chose the data type as string and then click on OK. Finally the local variable dialog box should look like below.


Now add an Action name as Set Field in the current item. Click on the First value link and choose your field name. Then click on the second value link, it will open the Look up dialog box. In the Data Source: choose Workflow Variables and Parameters. Field From Sourece: Your workflow variable name that we have created above. And Return Field As String as shown in the fig below:


Now your full action should look like below.


And it should work fine now. 


Sunday, October 26, 2014

Steps to create master page using design manager in SharePoint 2013

In this post we will discuss how we will create master page using design manager in SharePoint 2013.

Master Page: It is the common layout of a page that we use in every pages.
Default Master Pages in Sharepoint 2013: "Seattle" and "Oslo"

For Example:- I have made a basic layout through HTML as shown in below figure, which will be used in every pages of the site in Sharepoint 2013.


- How to implement the above HTML page in Sharepoint 2013 as a Master Page with examples?

Steps:

- First go to your respective Top level site. (i.e Asish Sharepoint Site).
- Then click on "setting" button at the top-right corner of the navigation bar.
- Then click on "Design Manager" as shown in below figure.
- If design manager is not available there, then go to the Site Collection features and activate "Sharepoint Publishing Infrastructure."


- Then you will redirect to the below page.


- As shown in the above figure click on "Upload design files" which is marked in red color.


- Then copy the URL and paste the same in another tab to open Master page gallery as shown in above figure.


- When the the "Master page Gallery" window appears as shown in the above figure, then navigate to the FILES tab and create a NEW FOLDER(e.g I have created ASISH folder) to maintain your files in an organized way .

- Then click on your respective folder that you have created.(for e.g  ASISH)


- When the above page will appear, then click on "FILES" tab and then click on "Upload Document" to add your HTML, js, css files and Images.


- Choose your HTML file and click on OK button


- Then the above form will appear where you fill the details as shown in above figure which is marked in red color.

- NOTE: When you are uploading a HTML file as an Master Page always choose the Content type as "HTML Master Page" and check on "Associated file" to create its corresponding master page as shown in below figures.


- Then Click on "Save" button.


- Your HTML page i.e "demomasterpage1.html"along with its master page i.e "demomasterpage1.master" has been created.
- Then we have to publish the corresponding html page by clicking on the drop down box near to the corresponding html page( as shown in below figure) to implement it in our pages.


- After completion of these steps then go the "Design Manager" and click on "Publish and Apply Design" then the below page will appear.
- Then you have to click on "Assign master pages to your site based on device channel" to implement it.



- Then the below form will appear where you have to select your master page.


- If you are selecting your master page on "Site master pages" level then your master page will reflect on your Custom pages.
- But if you are selecting your master page on "System Master Page" level then your master page will reflect in your Application Pages.
- And finally click on OK button.
- Then add a page to see whether the master page is reflecting or not.



Saturday, October 25, 2014

Lookup To address from list in SharePoint 2013 designer workflow

In this post we will discuss how we can lookup To address from a SharePoint list while sending emails using SharePoint 2013 designer workflow. If you have put any static email id in the SharePoint designer workflow for sending emails, then any time you need to change the recipients, you must open the workflow in the Workflow Designer and make the changes manually. So it is better to lookup the To or CC field from a list.

Also check out:


So first create a SharePoint custom list and the column which will contain the email id can be a Single line of text, Multiple lines of text, or Person or Group type columns. If you use a Person or Group column, only one entry can be made in each field that the workflow will reference for e-mail addresses. When creating the column, be sure to select No under Allow multiple selections. If you want to use this type of column to specify multiple recipients, you can create a SharePoint group that includes the people that you want the workflow to address the e-mail to, and then specify the group in the field. When creating the column, be sure to select People and Groups under Allow selection of.

In our case we will create a column which will contain a single user. For user convinient rename the Title column to Workflow Name and other column say WorkflowToId. Then we will add one item to the list Where the Workflow Name="My Test Workflow" and the WorkflowToId=bijay@enjoysharepoint.com and save the item. So the list with the item will look like below. Here Workflow Name is also important because we need to give this value in the designer workflow.


Now open you workflow in SharePoint designer 2013 and then click on the To icon to open the Select User dialog box. In the dialog box, click on "Workflow lookup for a User...". This will open the Lookup for Person or Group dialog box. Here in the datasource choose the list name that we made in above, and then Field from source the column name that contains the email id, in our case the column name is "WorkflowToId". Then in the other section, choose Field as the Title column of the new list, in our case we rename it as "Workflow Name" and then in the Value box write the value presented for that column. In our case it is My Test Workflow.
The dialog box will look like below:


After this the email will be send to the To address which is presented in the list. So afterwads if you want to change the To email id, simply change in the list, no need to open the workflow. If you want to add more To address, then you can add additional columns and store and use like above.


Site pages links missing in SharePoint 2013

Sometimes you will not see Site Pages link under Look and Feel in Site Settings. Here we will discuss how we can bring back Site Pages link.


Steps:
Open SharePoint site, from the right side click on Settings icon and then click on Site Settings.

Under Site Actions click on "Manage site features".
Then in the Site Features page, search for "Wiki Page Home Page" feature and click on Activate.
Go to Site Settings > Under Look and Feel Click on Welcome Page. It will appear like below:



SharePoint 2013 Disable Windows Authentication prompt

In this post we will discuss how to disable the windows authentication prompt which we usually got while opening a SharePoint site. If you are working in your local system and every time it is asking for user name and password it is better to save the authentication so that it will not ask repeatedly.


Steps:
Open Internet Explorer, then click on Tools -> Internet options.
Then in the Internet Options dialog box, Click on "Security" tab.
Then click on "Local Intranet" -> Custom level..
This will open the Security Settings - Local Intranet Zone.
There scroll down to end you will find "User Authentication" and then Logon.
Here choose the radio button "Automatically login with current user name and password".
Click OK.



Then restart your IE browser.

Now it should not ask you to enter windows credentials details.


SharePoint 2013 online error msoidcliL.dll file is missing

In this post we will discuss how to resolve error msoidcliL.dll file is missing which sometimes you will get while working in SharePoint online office 365. Also check out:

If you are working in SharePoint online (Office 365) and trying to authenticate sharepoint using SharePointOnlineCredentials, sometimes you may get the error saying msoidcliL.dll file is missing.

We have to use SharePointOnlineCredentials object if we are trying to authenticate in Office 365 (SharePoint Online) using ClientContext.

Here if you got the above error then first check whether the msoidcliL.dll exists in the directory C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Client.

If it is not presented then download the SharePoint Server 2013 Client Components SDK from this MSDN URL and install it.

Now it should work fine.


SharePoint 2013 error connections to the SharePoint server are currently disabled because the project is in Offline mode

In this post we will discuss how to resolve error connections to the SharePoint server are currently disabled because the project is in Offline mode which comes when trying to Uninstall an app in SharePoint 2013.


If you got the below error while uninstalling an app in SharePoint 2013:
Error occurred in deployment step 'Uninstall app for SharePoint': Connections to the SharePoint server are currently disabled because the project is in Offline mode. To connect to the SharePoint server, switch to Online mode by setting the project’s Server Connection property to Online, and then try the operation again.
then follow the below solution, may work for you.

Solution:
Open SharePoint project and then Select solution.
Now Press F4.
In the Properties window check for "Server Connection".
Here Select : Online and then Save.



Now it should work fine.


Wednesday, October 22, 2014

Error occurred in deployment step ‘Install app for SharePoint': The provided App differs from another App with the same version and product ID.

Recently while trying to deploy an SharePoint 2013 App, I got the below error:

Error occurred in deployment step ‘Install app for SharePoint': The provided App differs from another App with the same version and product ID.


The error is coming because an app has already been deployed and you are deploying it again using the same version. So the solution is to change the version.

Open the AppManifest.xml file and change the version.


Twitter Delicious Facebook Digg Favorites More