Friday, October 29, 2010

Hide List or Document Library With SharePoint Designer 2010 and ECMAScript

Hi all,

I know this topic is nothing complex, but the most strange this can look, I receive a lot of question and hits about how to Hide Lists from Browser, well I have a post already talking about this topic but was with SharePoint Designer 2007.
Now I want to make a update on how we can achieve this using the new tools and services from SharePoint 2010, there are multiple ways to make this update but I will explain using Microsoft SharePoint Designer 2010 and ECMAScript.
You can download Microsoft SharePoint Designer 2010 is free and is a excellent tool for administration and customization of your SharePoint Sites.

For this example we need to select the List or document Library to Hide, in this case I choose “Form Templates” open the SharePoint Designer 2010 and select the SharePoint site where the List/Document Library are.
On the Left side of your window you will see the option “Lists and Libraries” select the Document Library “Forms Templates” and right click selecting “List Settings”.

image image

In the List Settings of the Library “Forms Templates” you will have a option in “General Settings” check option “Hide from Browser

Ok, done is updated and is not visible on the browser.

Update List to Hide from Browser Using ECMAScript

To use this option you will need to be Shure you are using the Support file “SP.js” there is the Client Object Model for the ECMAScript API.
First we need to add the HTML Form Web Part, edit WebPart and select the option “Source Editor” and add the following script:

<script type="text/javascript">
            function GetSiteTitle() {

            var clientContext = new SP.ClientContext.get_current();
             var oWebsite = clientContext.get_web();
                targetList = oWebsite.get_lists().getByTitle('Form Templates');


                clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
            function onQuerySucceeded() {

                var listInfo = '';

                    listInfo += 'Is List Hidden: ' + targetList.get_hidden() + '\n';

            function onQueryFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
            <input id="Button1" type="button" value="Hide List" onclick="GetSiteTitle()" />

When we click on the button “Hide List” the script will update the List and Hide from Browser and will return his current state.
Here is the result….


Well, like I say before we have a lot of services and different ways to do the same thing, the most difficult is to know what I will use….


Thursday, October 21, 2010

Access to SharePoint 2010 External List (BCS) using Silverlight

Hi all,

Today I was preparing a little example about List result using External and Silverlight and like always I get a surprise not a good one….
Normally I use the REST Services to access to my List Data and make the Filter results using URL query Parameter, but for some reason External List cannot be access using REST Services…. Sad smile

After a little research using the http://[Site]/_vti_bin/ListData.svc Service I didn’t find my “CustomContact” List….

After that I just say, i am totally screwedbut in 2 seconds i remember used DataView Web Part for the External List using SharePoint Designer 2010 and start make a little research how is made and for my surprise I found a CAML View I could use for my Query on Silverlight and I say “Thank you SharePoint Designer 2010”  something you will never hear from me with SharePoint Designer 2007 Smile with tongue out.


Access to the CAML Filter and make the query in Silverlight.


After save the CAML Query and clean all parameters don’t use add on my Visual Studio 2010, even being careful adding the CAML I forget add all “<FiedRef>” and this post from the SharePoint Forum help me remember what I need to this CAML Work.

External6 External4

Here you have the final result with a Grid displaying the Result from the External List using the Silverlight.


Hope you liked and hope can help you grab information from External List using Silverlight…


Tuesday, October 19, 2010

How to pass values between SharePoint Web Part and Silverlight

Hi all,

This article try to explain how we can use SharePoint 2010 Web Part and pass values to Silverlight using code Behind and Visual studio and i will not enter on details on how we create WebPart Solution, that is other article....

The first thing you will need create on your WebPart is the embeeded Object for the Silverlight.
On the embeeded Object we need to define the following Parameters:

- Source: The XAP file where will be our Silverlight Solution.
- initparams: The values will pass from the webpart to our Silverlight solution.

To support the WebPart i will create the support WebControl class call SilverlightPlugin to pass the Values and file ".XAP" parameter.


To pass the values from the WebPart to Silverhligth we need to call the App.xaml file to access to Method “Application_Startup”. We call the values using InitParams and this values will pass to the MainPage Class like described in the image.

SL3 To pass the values to the Class MainPage the String values “param” and “url” have to be “public”.


This values can be very usefull if you want to pass info and pre-load info from the current Site, will help users add the correct information.

SL2 Very easy :P

By default already exist “Silverlight web Part” and have a property to pass values from Web Part to Silverlight, this is a example on how the values are transfer between this 2 diferent products.




Hope you like this article…
Have fun with SharePoint 2010. :)

Marcas Technorati: ,

Create a External Content Type SharePoint 2010

Hi all,

Today i have the time to create a simple Article trying to show how SharePoint Designer 2010 more the External Content Type to External Database are very easy to create and can be integrated with our SharePoint Portals.

You can download SharePoint Designer 2010 here:

For this Example I will create a Database in SQL Server and will use SharePoint Designer 2010 to create the connections and use as a mirror from our SharePoint Portal using List and the Database.

The first thing we need to do, is connect to SQL Server and create our Database call “Contacts” and add the Table “Contact” with the following fields.


When we create the External Content Type. We  will need to associate the Content Type, in this case i am using the Generic List, then we can create the Connection to the external Data Source.

ContentExternal1 ContentExternal2

After create the Connection to the Database we can define what Columns we will use and what operations we will add our custom List.
For this example i select all Operation they came default.

ContentExternal3 ContentExternal4

This operation are very important because the Business rules are defined in each operation.
After we create the diferent operations we can create the Custom List and define the how will be the Operation and add the Name for our custom List.


If you try to access the New Custom List Call “Custom Contact” you will see we will not have access to the Business Data Connectivity. 
To Resolve this issue we will need to give Access and permissions to users to the Custom External Content Type BDC connection in the Central administration.


Access to Central Administration Page and select the option “Service Application Tab> Manage Service Application”.
There you select the Service “Business Data Connectivity Service” then select “Manage”.

ContentExternal8 ContentExternal9

  This Option will list all External Content Type, choose the External Content Type we create and select the option “Set Object Permission”, this option will allow to add users to the BDC and manage the permissions to the Custom List.ContentExternal10 After the correct permissions are given we can Access to Data on our custom Contact List and start creating new Item and all the other options and operation we define to the same List.

ContentExternal11 ContentExternal12

  Hope you like this litle Article about connect Database Content to SharePoint Portal using the Externa Content Types and BCS.

Cheers :)

Business Process Management in SharePoint

In the Last Event of the SharePointPT Mark Miller talk about BPM (Business Process Management) can be critical when you are implementing SharePoint, Recomend read this Books.

Download ebooks
Link to Site

eBook: How Can Companies Kill the Things that Kill Productivity
written by: Steve Russell
Steve Russell has spent over 25 years in the technology trenches. In his first eBook for he shares six of the main stumbling blocks he has found when trying to analyze and manage typical business problems.How Can Companies Kill the Things that Kill Productivity? is a six part series originally published on EUSP. In this 24 page eBook version, Steve layouts common scenarios for recognizing productivity killers in your organization and how to slay them. Download the book to learn more about how you can kill your productivity killers!

Whitepaper: SharePoint and BPM - Finding the Sweetspot
written by: Derek Miers

Despite Microsoft’s best attempts to position the SharePoint platform for content and collaboration, many people still see it as a business process management (BPM) platform. The process management features of SharePoint 2010 are better than MOSS 2007, but they’re more limited than most modern BPM suites. Why? SharePoint 2010 processes are constrained by Windows Workflow Foundation (WF). When developers build process-oriented applications that leverage WF, they often find themselves hardcoding static, brittle interfaces that add to the total cost of ownership (TCO).

To use SharePoint 2010 as part of an enterprisewide BPM strategy, customers must add a comprehensive, SharePoint-oriented business process management suite (BPMS), which will raise vendor license costs, but lower overall TCO and risk.... to read more about "Finding the Sweetspot", download the whitepaper today!

Whitepaper: BPM Primer - People and Processes
written by: Colin Teubner

What is BPM? Today, many software vendors and consultants sell the benefits of “BPM.” depending on who you’re asking, BPM stands for a variety of things – business process management, business process monitoring, or business process modeling. It’s also surrounded by an orbit of other confusing acronyms – SOA, BAM, BRMS, BPA – the list goes on. It’s a wonder that anyone has figured out what these vendors are selling and purchased their products.

If you’re at the beginning of learning what BPM is all about, you will want to download this Whitepaper and learn more!

Monday, October 18, 2010

CanalSharePoint TechShare SharePoint 2010 - Brazil

If you live on Brazil and want to see SharePoint 2010 and his potential dont miss event from the SharePoint Comunity “CanalSharePoint” on Brazil and support with Portuguese/Brazilian Articles i do my articles with Bruno Velaz and you? :)

Entenda como construir portais buscando resultados!

TechShare 2010 - ROADSHOW em São Leopoldo

Agenda & Conteúdo

· 8:00 -   Credenciamento

· 8:30 –   Migrando para SharePoint 2010 

· 10:00 – Sessão Pergunte aos Especialistas e Cofee Break.

· 10:30 -  BI no seu portal usando SharePoint 2010  - (BCS, Visio Services, ExcelServices e PerformancePoint)

· 12:00 -  Almoço

· 13:00 -  Redes Sociais na prática, chega de conceitos!!!

· 14:00 -  Facilidades no Desenvolvimento do SharePoint 2010

· 15:00 – Sessão Pergunte aos Especialistas e Cofee Break.

· 15:30 –  Criando/Controlando seus processos para o seu Negócio , usando InfoPath 2010

· 16:30 -  Usando FAST no seu PORTAL, focando inteligência competitiva.

· 18:30-   Finalização do Evento




i-devNet - Internet e Colaboração Pronext - Soluções Inteligentes



Marcas Technorati:

Saturday, October 16, 2010

Collaboration days SharePoint 2010 - Switzerland

Yes, This year is just fantastic, SharePoint 2010 came to stay for looong time…
I have been in a lot of conferences about SharePoint 2010 arround Europe and almost each country have 1 or more SharePoint Comunity Groups a lot of excelent Speakers and Superb Events about SharePoint.

Now is the time for Switzerland have their super event about SharePoint 2010


The Collaboration Days, for the first time on 30 November 2010 (Workshop day) and 01-02. December 2010 (conference days) in Lucerne. The conference deals with the available since May 2010 Sharepoint 2010 platform from Microsoft. The basic motto of the conference is 'hands-on creating value' - our goal is to give you directly usable knowledge, both through lectures and via discussions with colleagues and peers.
Lucerne, always worth a visit! (Connect it but with the Collaboration Days).

SharePoint Community Switzerland

The SharePoint Community Switzerland is a platform for networking of SharePoint users, developers, partners and interested parties in Switzerland. The SharePoint community sees itself as a Switzerland-wide focal point for inquiries and interests around SharePoint. The central concern is the exchange of knowledge and representation of players in the market.
The SharePoint community is also represented Switzerland in Xing. Enter and since part of the SharePoint Community Switzerland.

Link to the Swiss SharePoint Comunity 

A Great event with a lot of Fantastic Speakers about SharePoint 2010 and i will be a speaker with the topic "SharePoint 2010 Client Object Model with Silverlight" :).

I have to congratulate the organizers of this fantastic event...

Organizer of the Event,

Blog and Contacts 
Stefan Heinz – Blogs in English - Swiss SharePoint Comunity - IT Consultant
David Böttger - Swiss SharePoint Comunity - IT Consultant


I am very confident in the success of this event .... all the best. :)

Marcas Technorati: ,

Create simple Google search WebPart using ECMAScript for sharePoint 2010

SharePoint 2010 have lot of news service but there is one i realy like the “Client Object Model” used to make Call to SharePoint Content  and in particular the ECMAScript supported by SP.JS file.
This Client Object Model is very usefull when you want to make use SharePoint content without using Visual Studio.
The best of all this Microsoft use almost the same name definition for the class, if you normaly work with SharePoint Server SDK API you will see the develomp dont change to much….


Ok Let Start creating our Google search Web Part with Modal Dialog.

  1. Edit the Page on your sharepoint 2010 Page and add new Web Part option “HTML Form Web Part”
  2. Edit Source Editor and add the following code
ECMAScript ECMAScript2


Here is the Code:

<script type="text/javascript">
function opendialog()
var options=SP.UI.$create_DialogOptions();
options.url="" + document.getElementById('PesquisaGoogle').value;
options.width= 600;
options.height= 500;
options.dialogReturnValueCallback= Function.createDelegate(null, CloseCallback);

function isCharKey(e)

function CloseCallback(result, target)
if (result == SP.UI.DialogResult.OK)
alert('O dialog funciona');
Google Search
<input type="text" id="PesquisaGoogle" name="firstname" onkeypress="isCharKey(event)" />
<input type="button" value="Go" onclick="opendialog()" />

And here is the final Result, voila very easy.


Modal Dialog is a very usefull tool for sharepoint for acessibility reasons, will help you turn SharePoint more easy to final users.

Hope you like this litle article :).