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

Wednesday, October 29, 2014

Infopath Error: The Query cannot run, Infopath cannot run the specified query. Access denied.

 Creating a InfoPath form for a document library in one of my project, publish the infopath form I got an error saying that “InfoPath cannot run the specified query. Access is denied”.
I have verified few blog posts and verified following options,
  • Permissions to document library and site – Yes iam having Full Control over site and Document library
  • Domain – Yes iam in VPN with the same network

But User cannot submit a form to SharePoint if the security level is ‘Restricted’ . We need to have Domain Trust should be Full Control or more.
To grant Full control we have to follow the steps below,
In the InfoPath File Click on “Form Options” as shown the image below,



In Form Option popup, Security and Trust, Select “Full Trust” on security level as shown the image below.



Click on Ok to save the settings. Now we can publish the InfoPath form with out errors. 

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.


Wednesday, September 10, 2014

Check SharePoint service status using SharePoint object model

By using SharePoint object model we can retrieve the User Profile Service information like User Profiles and user group details from UserProfileManager class. Some times we can see “UserProfileApplicationNotAvailable” error. We can check service availability details using following code block.

public bool IsCurrentServiceisInStart(string serviceName)
{
    bool currentServiceisInStart = false;

    SPService currentService = SPFarm.Local.Services.FirstOrDefault(s => s.TypeName.Equals(serviceName));

    if (currentService!= null )
    {
        SPServiceInstance serviceInstance  = service.Instances.FirstOrDefault(i => i.Status == SPObjectStatus.Online);
        If(serviceInstance !=null)
                currentServiceisInStart=true;
    }

    return currentServiceisInStart;

}

We can check the current service from SharePoint local services by mentioning the service application details as “SPFarm.Local.Services.FirstOrDefault” command in Linq.

We can use this code block while calling SharePoint service application. Hope this will help.

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.

Thursday, September 4, 2014

InfoPath error – “Your user name or group membership cannot be verified because the form's security settings do not permit it.”

Working with existing InfoPath forms, while opening the form it is showing error as “Your user name or group membership cannot be verified because the form's security settings do not permit it.” As shown the below.



 We can get this error due to form security error. To fix that we need to add the site to local sites by using the steps below.

Navigate to IE and open Internet Option from IE settings.


In the Security Tab, Select “Local Intranet” option and click on Sites button.


You can see “local Intranet” popup, click on “Advanced” button.


Add the Site to local intranet sites by clicking on Add button. Click on Close button.


Click on Ok button to Save “local Intranet” popup and Ok button to close internet options.

By opening the form we can see the form without any errors. Hope this helps.

Sunday, August 31, 2014

SharePoint 2013 – office 365 site save site as template error

In Office 365 site, to save customized site as template we can’t have save site as template option as we don’t even activate publishing feature. For example, I have created a site in office 365 environment and added some third party customized features like twitter and tried to save the site as template by navigating to Site settings. Bu I am unable to find “Save site as template” option in site settings page.

While troubleshooting the issue I have checked few posts in msdn and tech net forum. By checking all the posts I have found that SharePoint doesn't allow to save the third party apps. By removing the third party apps, i am able to save the site as template. But I need the third party app should be include in my sub site.

By checking few more posts I got a trick for this. To enable save site as a template in site settings page, we have to set “SaveSiteAsATemplateEnabled” parameter in office 365 site. To do that, open the site in SharePoint designer in homepage, click on “Site Options” link.

We can get a pop up box with four tabs. In Parameters tab, find for “SaveSiteAsATemplateEnabled” and update the value from false to true.