.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

Client Object Model - cannot retrive "Modified By" field value

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :SharePoint
Hi, I am using Client Object Model to get all items from a list and display theme with "Modified By" information. Everything works nice until I start using test users. I have noticed that for user who is in Domain Admins group i have no problem for others I cannot read "modiefied by" field value. var context = ClientContext.Current; activitySPList = context.Site.RootWeb.Lists.GetByTitle("Activities") activityItems = activitySPList.GetItems(CamlQuery.CreateAllItemsQuery()); context.Load(activityItems); context.ExecuteQueryAsync( ClientRequestSucceeded, ClientRequestFailed ); All items in activityItems collection doesn't have "Modified By" fields. Do you know why and how to fix it? Thanks for your help.

View Complete Post

More Related Resource Links

SP2010 Client Object Model: How to cast Field to FieldCalculated

Hello, I need to modify formula for existing field and can't do it because this code raise exception - (Cannot cast 'fld' (which has an actual type of 'Microsoft.SharePoint.Client.Field') to 'Microsoft.SharePoint.Client.FieldCalculated').   using (var clientContext = new ClientContext(@"http://Server")) { var web = clientContext.Web; var lst = web.Lists.GetByTitle("MyList"); <strong>var fld = (FieldCalculated)lst.Fields.GetByInternalNameOrTitle("Formula1");</strong> clientContext.Load(fld); clientContext.ExecuteQuery(); }   I can't use fld.SchemaXml modification by some reason. May be you can help me? Thank you.

How to assign value to managed metadata field from client object model?


I am working on the project that is based on Client Object Model which should be able to create/update document sets form client side with possibility to fully manage column values. I've managed so far to manipulate from client most of field values but i'm still struggling with managed metadata fields. I know that there isn't any support for this type of field in CSOM so I used TaxonomyClientService which is available from server side and managed to retrieve data necessary for displaying field info. I also discovered that value for this field should be assigned in string form like [WssId]#[TermName]|[TermGUID] to be valid. My problem is how to retrieve WssId. I know it can be found in TaxonomyHiddenList of site collection but since it contains only values that were used in site collection so far it doesn't represent full solution for my problem. Any help would be appreciated.

Thanks in advance..

Add a field to site columns using Client Object Model



I am having an issue when trying to add a field to the web.AvailableFields.  I am using web.AvailableFields.AddFieldAsXml(...)  but it seem that you need to associate the field with a list.  Is it not possible to add a field to the site collection columns using the client object model?

What I am doing is creating a content type and then adding fields to this content type, if the fields dont exist I what to create them but an having a problem doing so.



Assigning External content type field column value using Client Object Model


I have a problem assinging External column value to ListItem object with client object model-based application I'm developing. To be precise, I am able to retrieve data related to external content type by reading external list created from this content type but I don't know how to properly use it to assign value to this field. By doing some research on my own I concluded that BDC ID column from external list is the way to go since it uniquely defines selected row from external list but that doesn't tell me much since I don't know what to do with it. Currently I ended up with partial solution - to assign plain string value of picker column but that makes this value visible only in "View Properties" option on Sharepoint and not in "Edit Properties" which pritty much makes sence since it isn't properly related to rest of the data in specific row. Does someone have a better solution for this?

Igor S.

Displaying the AssignedTo Field Value using the Client Object Model


I was wondering if there's a way to properly get the field value for the AssignedTo field?  All I'm getting back is Microsoft.SharePoint.Client.FieldUserValue.  I understand there's an id associated with each user in the site collection and that it looks it up.  I just thought the COM would've taken care of it.

Thanks in advance!

Imports Microsoft.SharePoint.Client
Module Module1
  Sub Main()
    Dim NewClientContext As New ClientContext("http://localhost")
    Dim ClientLists As List = NewClientContext.Web.Lists.GetByTitle("Project Tasks")
    Dim CamlQuery As New CamlQuery
    CamlQuery.ViewXml = "<View/>"
    Dim ClientListItems As ListItemCollection = ClientLists.GetItems(CamlQuery)

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.

Quick Note: Building WPF Applications by Using the SharePoint 2010 Client Object Model

Learn how to create a Windows Presentation Foundation (WPF) application that uses the SharePoint 2010 client object model to retrieve data from a SharePoint Web site.

Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0

Write client-side applications that work with Open XML documents that are stored in document libraries by using these two technologies together.

Using the SharePoint Foundation 2010 Managed Client Object Model

Write applications that are based on the .NET Framework and access SharePoint content from clients without installing code on the server that runs SharePoint Foundation 2010.

Video: Overview of the SharePoint 2010 Client Object Model

In SharePoint 2010 there are a number of object models that can be used by developers to access the server. For example, the Client Object Model (Client OM) can be accessed via Web services, via a client (JavaScript) API, and via REST. (Length: 12:22)

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: SharePoint 2010: ECMAScript Client Object Model

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

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

This demonstration shows how to use the client object model from a console application. (Length: 8:47)

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)

Video: SharePoint 2010 Data and the Client Object Model

This video provides an overview of how to use the client object model from a Windows Presentation Foundation application. (Length: 5:38)

Client object model Authentication.

  Sorry for my bad english. With WPF, I can get authentication using below code             ClientContext clientContext = new ClientContext("URL");             clientContext.AuthenticationMode = ClientAuthenticationMode.Default;             NetworkCredential credential = new NetworkCredential("ID", "PASSWORD", "URL");             clientContext.Credentials = credential; But with silverlight, I can't find AuthenticationMode property with ClientContext.   I want to get authentication using client object model with silverlight. Can anybody help me?   thanks!!   

View Definition for SP 2010 Client Object Model

Hello, I am looking for where in the SP Client Object Model that I would find where the View Definitions are Located. For various reasons, I am displaying in my own custom listview a list of Documents and I would like these list results to share the same look as if the user was looking at the list in SharePoint.Please note this is NOT web based, but an application. Can someone give me a hint as to how to pull a view definition? Thanks, Andrew
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