31 martie 2012 14:30
I need to read data with linq from a userfield which i have deployed by content type:
But i get only the Displayname like "Peter Pan" and not the login name. When i change the "show field" value with the user interface for this field to "account" it works. But i cannot change this declarative in the content type xml...
i don't want to change this manually to not loose the relation of the content type and the definition...
any ideas would be great!
2 aprilie 2012 09:02Moderator
If you just want to get the user login name information from linq to SharePoint, you can use SPFieldUserValue.user.LoginName property during the query.
SharePoint field definition for user and group field doesn’t provide a way to change show field value in the definition file, if you want to achieve this, you may consider customizing field inherit from the user field, here is an article about this, you can refer to it for more information:
TechNet Community Support
- Marcat ca răspuns de Qiao WeiMicrosoft Contingent Staff, Moderator 6 aprilie 2012 13:25