27 April, 2014

Exporting and Importing the Sharepoint Designer Reusable Workflow

Steps to Export the Designer Workflow

1.Open the Site in sharepoint Designer

2.Click on Workflow and select your Reusable workflow that you want to export.

3.On the Ribbon , You can see “Save As Template” option. Click on that. In my case I am trying to export “Employee Workflow” As shown in the Screenshot.


4.WSP for that Workflow will be created and it will get stored in SiteAssets.


5.Go to your site and open site assets(Site action->All Site content->Site Assets under Document Libraries. Download the Workflow WSP from the site Assets to your local drive.

Steps to Import the Designer workflow

1.Go to the site where you want to import the workflow .

2.Then go to Site Action->Site Settings->Click on “Solutions” under Galleries.

3.Upload the Exported WSP and activate the solution.

4.Then you need to go to site action--> Site Settings-->Manage Site features.

5.Check for a feature that starts with “Workflow template < Your Exported Workflow name>” And activate that feature.

6.Now its all set. Workflow is imported.

You can add the workflow to any List/Library by going to List/Library setting and click on add workflow. You will see that your workflow is there in the list as shown below.



 Cheers !!! :) 

22 April, 2014

The SPListItem provided is not compatible with a Publishing Page

Problem description:
I was facing this error while submitting information via list view webpart, additionally problems with the check-in – checkout functionality.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Error message:
The SPListItem provided is not compatible with a Publishing Page

ULS Logs Findings:
System.ArgumentException: Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page.    at Microsoft.SharePoint.Publishing.PublishingPage.GetPublishingPage(SPListItem sourceListItem)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageStateControl.RaisePostBackEventForPageRouting(String eventArgument, SPRibbonCommandHandler control, RaisePostBackEventDelegate raisePostBackEventDelegate)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageCheckinHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)b3c1032c-e249-4879-82f6-02e4b3db028c

Troubleshooting done:
o   Checked the ULS logs
o   Tried changing the master page but didn’t resolves the issue
o   Checked with different templates but that also showed the same error message
o   Tried replicating on different web application but same results i.e. same error!

As you can see the error message itself saying that there is some relation with the publishing functionality so what you can do to resolve this issue? Here are the details.

Resolution#1:
1.   Open your SharePoint site
2.   Site actions
3.   Site Settings
4.   Manage site features
5.   Deactivate “Publishing Infrastructure” feature – scope is WEB

Once that done, we need to repeat the same steps at the site level (scope is different)
1.   Site ->Site actions->Site settings
2.   Site collection administration
3.   Site collection features
4.   Deactivate “Publishing Infrastructure” feature
Bottom line: we have deactivated “Publishing Infrastructure” feature at the web as well as site level.

Now, let’s re-activate the same feature one by one (order will be different this time) i.e. site scope first and then web scope.

If the above steps don't resolves the issues then please use the following script to resolve it.

Resolution#2:
$web = get-spweb "http://site-collection/URL-of-the-problem-site"
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()
$web.Update()
$web.AllProperties["__PublishingFeatureActivated"] = "True"
$web.Update()

That’s it – done!If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issue, Thank you.

Product Applies To:
v  SharePoint 2010
v  SharePoint 2013

21 April, 2014

Infopath Error: The amount of data that was returned by a data connection has exceeded - SharePoint2010/SharePoint2013

I have designed one InfoPath form which is trying to fetch number of items via data connection from SharePoint list which consist of more than 10,000 items. When I designed the form 6-7 months before then it was working fine without any issues but over the period of time, we have modified the InfoPath form with certain number of fields and this is a starting point of error – when published the form without any issues but the form is not opening in browser mode functionality and throwing the following exception.

Error message#1:
The amount of data that was returned by a data connection has exceeded the maximum limit that was configured by the server administrator. Form elements, such as drop-down lists, may be blank.

Error message#2:
Cannot connect to the server at this time. You can continue working with this list, but some data may not be available.



It took little time to figured out the resolution for this issue let me share the resolution in detail and Yes, step by step so that there will be no confusion.

Resolution:
1.   Open the central administration
2.   General Application Settings
3.   InfoPath Form Services
4.   Configure InfoPath Form Services
5.   Data Connection Response Size
6.   By default it is 1500 kilobytes -> Here is little bit testing you need to do with respect to your form. Like try to change it to 2000 and check the results.


If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

IMP:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product Applies To:
o   SharePoint Server 2010
o   SharePoint Server 2013

17 April, 2014

InfoPath form library forms cannot be filled out in a Web browser

Today I was monitoring the SP servers along with some regular sanity checks that need to be carried out on daily basis. While doing that, I noticed one error based on this InfoPath rendering in the Health check analyzer!  But let me tell guys InfoPath is perfectly working in our environment without any issues and nobody has reported any incident also then why this error is showing in the health analyzer? – you must be thinking the same but no need to worry about as this is not a big one which will take lot of your time, some minor checks and you are done.

Error message:
InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured.

If this is your new configuration then you need to follow this existing official documentation from Microsoft which is pretty awesome!

In our case, we have already done this configuration long time back and as I said, it’s working fine. The error message is little bit misleading one as its asking you to check the “state service” service application to be online or not but that’s not the case. We have already configured this service application long time back so where exactly the issue is and why it’s throwing the error?

Let me tell you the trick which we sometimes ignored – Look out the error in the HAL rule – see the below:


You will notice that it’s also giving you the URL of the web application for whom its failing and name of the servers also.

In our case, we have recently created a new web application in the farm and its been reflected in that! What it means? Pretty simple – the ‘state service’ service application is not configured for the same.

So what we need to do now for this re-association? Here are the details:

Resolution:
1.   Open the central Administration
2.   Application management
3.   Service applications
4.   Configure service application associations
5.   Select the web application for whim it’s failing
6.   Click on custom
7.   It will open the service application options
8.   Select the state service check box and click OK

Once you are done with the above steps then come back to health analyzer list, click on the same rule and hit “Reanalyze now” – that’s it, you are done.

That error won’t be there! Happy SharePoint once again…
If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product Applies To:
o   SharePoint 2010
o   SharePoint 2013
o   SharePoint Foundation 2013
o   SharePoint Foundation 2010