Welcome on my SharePoint 2010 blog

Hello,

My name's Roy. I'm a dutch SharePoint & BI consultant/architect at Advantive B.V. At this moment I'm busy with some big SharePoint 2010 projects in The Netherlands. In all the projects I've got different roles, like: Business consultancy, Lead Consultant, Architect (logical and technical), Development and Teaching/courses.

Products where you can ask me about are: SharePoint, Visual Studio, SQL Server, PowerPivot, Analysis and Reporting Services, Visio Services, InfoPath, PerformancePoint Services, Team Foundation Server, Office line.

I love to work and to write about Microsoft SharePoint 2010 so, feel free and read/comment my Blogs!

Greetz.

Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Thursday, December 9, 2010

Change default values BCS service application for External Lists

When you want to use/show external lists in your SharePoint 2010 environment that have more then 2000 rows, you get the following error:

The above error is a pretty general error that doesn’t tell you the real problem. When you get this error through a mobile phone UI, you get a more detailed error:


The dialog above tells us that the external list has got a predefined maximum of 2000 rows. The amount of maximum can be changed by using PowerShell
Steps:
·         Open SharePoint Management Shell
·         Search for the ID of the BCS service application via the cmdlet: Get-SPServiceApplicationProxy
·         When you found your ID, enter the following command:
Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy  <fill in GUID here>, when you hit <Enter> you get the following information:

·         To change the default values, enter the following commands:
$Db = Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy 6b43909f-a52b-4d6e-8c06-631deccf8dcb
Set-SPBusinessDataCatalogThrottleConfig -Identity $Db -maximum 25000 -default 19000

·         After we ran the commands we see that the values are changed:


After that go back to the SharePoint environment and refresh you page, you now will see your rows from the external datasource in this external list:


Wednesday, November 10, 2010

Deploy InfoPath 2010 Forms with PowerShell

How to deploy Administrator Approved InfoPath 2010 forms with PowerShell....well it's pretty easy and it saves you a lot of work.

So: instead of publishing the form to the server (administrator approved publishing), send a question to your administrator to verify it and then wait till he/she uploaded it and deployed the solution and activated the feature on your site collection you can use the following commands:

Uninstall the existing solution (based on the from file name):
Uninstall-SPInfoPathFormTemplate -Identity Exampleform.xsn

Install the new solution (based on the from file name):
Install-SPInfoPathFormTemplate -Path C:\Form.xsn

Disable feature on site collection level
Disable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site http://SPSite 

Enable feature on site collection level
Enable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site "http://SPSite"  

Important note:
Make sure that you publish the xsn as follows:

  • Open the backstage in infopath after creating the form and click Server SharePoint:

  • Choose your site collection and click next


  •  Then Check that you must use the form throughout the browser and choose the last option (by administrator approved form) and click next


  • Choose a location (on your local machine or network drive) where to publish the xsn (not to SharePoint location!! because you cannot enter a sharepoint path in the cmdlet in PowerShell).


  • If you want to add columns to the sharepoint forms list or parameters, you can add them here from your InfoPath field list. Click next.


  •  Click publish and your xsn is published to your location. Now you can use the above PowerShell scripts to deploy the solution and activate the feature.


Werner and I did it again!!