.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Silverlight Client Object Model - List Fields Names

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :SharePoint

I'm trying to get the DisplayName of the Fields of a list through the Client Object Model (Silverlight)

I can retrieve the fields of a list as an authenticated user but not as anonymous: getting list.fields as anonymous simply returns Access Denied.

Is there a way to enable list.fields for the Client Object Model?

Or is there any other way of getting the DisplayName of Fields of a List?

View Complete Post

More Related Resource Links

Video: SharePoint 2010: Silverlight Client Object Model

In this video you will learn how to use the SharePoint client object model to program a Silverlight application against SharePoint data. (Length: 9:03)

Video: Developing Silverlight Applications by Using the SharePoint 2010 Client Object Model

This demonstration shows how to use the client object model from a Silverlight application. (Length: 11:15)

How to get List ContentTypes using ECMAScript Client Object Model?

Hello SharePoint Experts, I have a document library in SP 2010 site which also has a custom Ribbon button. The user can select either a folder or a document/List Item from the document library. I want to disable the custom Ribbon button if the user selects the folder and enable it when the user selects document/List Item. I want to do all this using JavaScript/ECMAScript Client Object Model. I tried many things,but could not do it yet. I know I how to check if the currently selected item has a Folder ContentType or an Item ContentType. Code: var _clientContext = new SP.ClientContext.get_current(); var _web = _clientContext.get_web(); var _list = _web.get_lists().getById(SP.ListOperation.Selection.getSelectedList());                                  _clientContext.load(_list, 'Title', 'Id'); _clientContext.executeQueryAsync(Function.createDelegate(this, onListLoaded), Function.createDelegate(this, onListFailed)); function onListLoaded(sender, args) {                                   alert('onListLoaded...');        &n

Client Object Model : Transactional update of list and content types

I am using Silverlight client object model to code against Sharepoint. Essentially, what I want is that when a user clicks a button, An item needs to be added to a list and also a new content type has to be created. button1_click() { //1. Create an item in a list. //2.  Create a new content type. } Also this should be transactional:  only if item is added should the content type be added too, otherwise roll back both. (and vice-versa). My understanding of client object model is that we at the core we are talking to Sharepoint WCF services. So if I say, using(TransactionScope scope = new TransactionScope()) { ClientContext.ExecuteQueryAsync(); scope.Complete(); } can I assume that the updation will be transactional??

Silverlight client object model : Read a document from a document library

How do I read/download a document/file from a SharePoint document library using silverlight client object model? The most closest function that I found was: Microsoft.SharePoint.Client.File.OpenBinaryDirect() but this seems to be throwing an exception "Operation not supported".

Create List Sharepoint Client Object Model Access Denied



I am trying to create a silverlight application by making use of the SharePoint 2010 Client Object Model using the following code:

private void CreateList(object sender, ClientRequestFailedEventArgs e)
  ClientContext ctx = new ClientContext("http://server");
  ListCreationInformation lc = new ListCreationInformation();
  lc.Title = "FlexiTime";
  lc.Description = "";
  lc.TemplateType = (int)ListTemplateType.GenericList;
  List newList = ctx.Web.Lists.Add(lc);
  System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(CreateListCallback), ctx);

private void CreateListCallback(object s)
  var context = (ClientContext)s;  

The error I receive is as follows:


Start site workflow using silverlight client object model.



I created a sequensial site workflow using VS2010. Its working fine. I want to start it manually using silverlight client object model.

Can any one help me how it can be done?

Silverlight Application using Sharepoint as a datasource using the Client Object Model



In my scenario i have a Silverlight application hosted in ASP.NET. I want to push/pull data from a sharepoint site using the Client Object Model. Is this possible?

Notice that i don't want my Silverlight app as a web part...it is hosted in asp.net and just uses Sharepoint 2010 as a data source. Will the Client Object Model work here or are sharepoint web services the only way out??. I can host both the SL app and the sharepoint site in the same domain if required...

Please advice





How to update workflow task and terminate workflow using silverlight client object model.



I have created a sequential workflow using visual studio. I also created a content type inherited from the workflow-task content type. Workflow creates a task-item in the task list. I want to update the workflow task using the silverlight client object model. I find on the internet and WorkflowTask.AlterTask() method to update the workflow task item. But I didn't find the equivalent of WorkflowTask.AlterTask(). Can any one help me to update the workflow task from the silverlight client object model?

I also want to terminate the workflow instance using silverlight client object model, but i didn't find any way to terminate the workflow using client object model?

SharePoint 2010 site using FQDN and Silverlight Client object model issues


I am working a FQDN installation of SP2010 site and I am having touble connecting to it from Silverlight, when my Silverlight app is running outside that SP2010.
Just to include the note, that if I use the CLR client object model, from a Console Application, I am able to connect to the FQDN SP 2010 site, and get all data I need. Using the CLR and monitoring with fiddler there are two consequent requests made: first GET to http://my_sp2010_site_fqdn/_vti_bin/sites.asmx, then POST to http://my_sp2010_site_fqdn/_vti_bin/client.svc/ProcessQuery and Everything works fine.
However when it comes to the Silverlight Client I have troubles.
If I put my silverlight application in a web part inside my site, it works. If I put it on a regular site, outside SP - it does not work and following behavior is observed:

There is initial request sent to
but there is no consequent request to http://my_sp2010_site_fqdn/_vti_bin/client.svc
That second request does not even show up in fiddler.

private ListItemCollection _projects;


Using Silverlight Client Object Model outside Sharepoint ?


Is there any way to make the Silverlight Client Object work with SharePoint 2010, if the Silverlight Application is not hosted inside the SharePoint itself? So far I was able to make it work only if I host my Silverlight inside SharePoint, and I can't make it work in a stand-alone Silverlight Application. I have clieantaccesspolicy file within the sharepoint site I want to connect to, but the client itself does not work. There is initial request sent to
but there is no consequent request to http://my_sp2010_site_fqdn/_vti_bin/client.svc and my RequestFailed handler is hit with following exception:

e.Exception is SecurityException:
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryGetResponseAsyncCallback(IAsyncResult asyncResult)
Inner Exception is:
   at System.Net.Browser.BrowserHttpWebReque

How to access querystring in Client Object model [silverlight webpart]


can we access querystring in Client Object model [silverlight webpart]?


Accessing SharePoint 2010 Data with the Silverlight Client Object Model (Visual How To)

Learn how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

Video: Accessing SharePoint 2010 Data with the Silverlight Client Object Model

Watch a short video that shows how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

Sample: Accessing SharePoint 2010 Data with the Silverlight Client Object Model (Visual How To)

Explore code that shows how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

How to query all the lists in a Web using Client Object Model in Silverlight ??


Hi All,

I'm trying to query all the lists in a SharePoint web using Client Object Model. I wrote the following code but it returns an error.



 foreach (List olist in olistcoll)



  camlQuery = new CamlQuery();

                    camlQuery.ViewXml = "<View/>";

                    collListItem = null;

                    collListItem = olist.GetItems(camlQuery);


                    ctx.ExecuteQueryAsync(onQuerySucceeded1, onQueryFailed1);





 private void onQuerySucceeded1(object sender, ClientRequestSucceededEventArgs args)


            UpdateUIMethod updateUI = DisplayInfo1;


Client Object Model Resource Center | SharePoint 2010

Are you creating client applications that access SharePoint data remotely? Find overviews, guidelines, and programming tasks for all three flavors of the SharePoint Foundation client object model: .NET managed, Silverlight, and ECMAScript.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend