Showing posts with label Sharepoint 2010. Show all posts
Showing posts with label Sharepoint 2010. Show all posts

Sunday, September 21, 2014

SharePoint InfoPath form Allow anonymous users to enter data

SharePoint InfoPath forms is one of the way to enter data into SharePoint. To allow anonymous users to enter the data in the forms we have to follow the steps below,
  • Configure Anonymous access to SharePoint site
  • Create a list that to submit data anonymously, Change anonymous permissions to the list and update list form to InfoPath form

To configure Anonymous access to Site, navigate to SharePoint central Administration, Navigate to Application management -> Manage Web Applications.

Select the web application, click on “Authentication Providers” in the ribbon. Check “Enable anonymous access” checkbox to Enable Anonymous Access to web application.



To Enable Anonymous access to SharePoint site, Navigate to SharePoint site where we need to allow users enable anonymous access. Open Site Settings, Select Site Permissions. In Ribbon, Permissions Tools section, click on Anonymous access button.



Select Entire Web site option in Anonymous access popup.



Create a List in the site. In List permissions, Break permissions from Parent and Enable Anonymous access to Add items to list.














Customize the InfoPath form by  using Customize List option in the ribbon. 


Tuesday, September 16, 2014

SharePoint content type error “The content type is in use”

One of my project from recent times I was worked on content hub to manage the content types in SharePoint. While changing the content type name, I got an error saying that “The content type is in use” as shown the image below.



I have checked all the content types in current site, I haven’t seen any content type with the current name. By checking few blogs like mavention and sympmarc I got the reasons for this error.

There many reasons for this issue as listed below,

Content type still exists in Site: Even we can’t see the content type in SharePoint content type gallery, it may exists in Recycle Bin (Site Recycle Bin or Site collection Recycle Bin). We have to remove the content type from Recycle Bin too. To remove the content type from Site Collection Recycle Bin, we need to have Site Collection privileges on Site Collection.

Other users might have associated anywhere? There is another chance that other users might have associated with the content type that we can’t see. We can see this behavior in SharePoint document libraries. We can check this by navigating to SharePoint Library settings and click on Manage Check out files. We can see the list of items belongs to other users. If it ok, take the owner ship of the items and check-in them.

Minor Versions:  We have one more possibility that there are some items may checked-in with minor versions in the List/Library. We have to check the appropriate items and need to publish the items with major versions.
This may helps.


Sunday, September 7, 2014

SharePoint custom workflow send email task error: The e-mail message cannot be sent. Make sure the email has a valid recipient

While working with SharePoint custom workflow with Send email task, i am seeing “The e-mail message cannot be sent. Make sure the email has a valid recipient” error in workflow history list every time workflow fired. I was in a confusion that why I am seeing that every time.

Very first time designing workflow I have left all properties for “Send Mail” task empty as I am sending emails through code without interacting any property in Send mail task. I have updated all the properties by creating new Field Properties in the code. But still seeing the same error in workflow history list.

By checking few posts, the error may cause because of two reasons,
  • ·         There is no e-mail in Active directory for system Account.
  • ·         Getting null values for existing properties as not assigning the values.

Here in my case iam getting null values from field properties. So I have updated a dummy email in To field as I am not using the the property anywhere in the code.

Hope this will helps.

Saturday, August 30, 2014

SharePoint – Back to basics - Are sure you are SharePoint Farm Administrator?

How can I’ll be SharePoint farm Administrator? By Adding Farm Admin group from SharePoint Central Admin site as shown the below I’ll become Farm Administrator?



But as we have expected by completing all the steps, these will not grant Farm Admin privileges on the server. These steps will add user to farm admin group in SharePoint and WSS_ADMIN_WPG group in SharePoint farm. By updating user to this farm admin, users get access to web site and access to SharePoint resources as logs and web services.

If user not added in SharePoint local Admin group, user is not fully-fledged SharePoint farm administrator. When user runs SharePoint management he will see "The local farm is not accessible. Cmdlets with feature dependency ID is not registered."

To execute PowerShell commands, users need SharePoint_Shell_Access in SQL server SharePoint configuration database and other databases where we need to manage the data.

Therefore, to make a user as SharePoint farm admin, he need to have following permissions,

·      Local Administrator security group for each server in the farm
·      Farm Administration SharePoint Group
·      SQL Server SharePoint_Shell_Access database role for the SharePoint configuration database and all content databases.



Wednesday, July 16, 2014

SSRS report – SharePoint list error: an error occurred when accessing the specified SharePoint list. The connection string might not be valid

While creating the report by using SharePoint list, I got an error saying that “an error occurred when accessing the specified SharePoint list. The connection string might not be valid” as shown the image below.



I have checked all the possibilities for the error by changing the credentials in the report. It didn’t worked for me. Changed the connection string URL. Restarted BI development studio and Restarted Reporting services and finally restarted the machine too... No luck. L
By checking more than half day I have found the cause. The reason is, I have changed my VPN password recently and disabled UAC in my machine. So by connection the site, it is using my old password stored in windows vault.

We have to change the stored credentials in windows vault by using the steps below,
Navigate to Windows vault and in Windows credentials section select the site and update the credentials.




Now Iam able to access the list from SharePoint list  

Saturday, July 5, 2014

PowerShell Commands: Download files/documents from SharePoint document libraries

In SharePoint 2013 we have an option to sync all the data from SharePoint document libraries to local folders by using Shared drive concept. We can download the document s from SharePoint document library using Power Shell commands also. We can do that in overall site collections and all the site collection may contain loads of documents and downloading one by one is a huge task by using windows explorer.

To download the document we can use following script,

$listUrls="Doc lib 1 URL″,” Doc lib 2 URL ″,” Doc lib 3 URL ″," Doc lib 4 URL ″ (All the document libraries URL’s)
#Enter the web site URL

$web = Get-SPWeb -Identity $webUrl

#Load all the list URLs in the web, Open the list URL.

foreach($listUrl in $listUrls)
{

#get the list URL

$list = $web.GetList($webUrl+”/”+$listUrl)

function DownloadDocuments{
    param($folderUrl)
    $folder = $web.GetFolder($folderUrl)
    foreach ($file in $folder.Files) {

       
#Ensure destination directory

        $destinationfolder = $destination + “/” + $folder.Url
        if (!(Test-Path -path $destinationfolder))
        {
            $dest = New-Item $destinationfolder -type directory
        }

       
#Download file

        $binary = $file.OpenBinary()
        $stream = New-Object System.IO.FileStream($destinationfolder + “/” + $file.Name)
        $writer = New-Object System.IO.BinaryWriter($stream)
        $writer.write($binary)
        $writer.Close()
        }
}

#Download root folder documents

DownloadDocuments ($list.RootFolder.Url)
foreach ($folder in $list.Folders) {

#download all the documents in each sub folders

   DownloadDocuments($folder.Url)
}