Posts Tagged ‘people and group’

Hello everyone

After investigating for about a week on an issue, I’m here to summerize and give you information about it.

Our platfrom is SharePoint 2013 and using office 2013 client applications. We have a root site collection and couple of host named site collections also.

If you need to use people and group fields in Document Infomation Panel or as people picker in InfoPath forms, maybe you have seen that your InfoPath form or Word document stops working and it may hang or carsh.

By searching internet you will come up with some ideas that you should modify the web.config file and set attribute MultipleSiteBindingEnabled to True.

Something like this:

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

However I found that this modification could have lots of annoying side effects and is not working properly. Although depends on your configuration. I recommend don’t do it!  It can cause the drag and drop functionality on document libraries stop working, it can cause the internal people and group fields (for example for lists) stop searching the directory and it can cause SharePoint designer to not be able to connect to your sites.

What I found instead was quite simple suprisingly. We had used manully binding into IIS which I found is not correct. To summerize and cut a long story short, I found:

  1. There is no need to modify the web.config file for adding multiple site bindings attribute
  2. And more importantly never ever manually add site binding into the IIS console


Just following this two instructions everything works like a charm in our farm.

Hope this helps.

Navid 🙂




Today I was working on one of my custom data views. After I inserted the “Created by” field, I found that I can’t remove it’s hyperlink. ( so users can click on it and then they’ll redirect to the user display page)

I didn’t want that! So after a little searching I found a solution here.

in the code view find the people and group field. You should format it as Lable and then change te value of text property to: ( in my case it was Created by)

text=”{substring-after(substring-before(substring-after(@Author, ‘ID=’), ‘&lt;’), ‘&gt;’)}”

In my case it worked !

if you copy and paste the above code, don’t forget to change the quotes and double quotes.

Today I was working on my custom web part. One of my questions was : after pressing submit button how to update a people and group field in the destination list.

I tested many ways and they gives me this error :

Invalid data has been used to update the list item. The field you are trying to update may be read only.

after searching and googling for some hours I found it in my way , here it is :

SPListItemCollection itemCollection;
SPListItem item;
PeopleEditor people;
PickerEntity picker;
SPUserInfo userInf;
SPUser user;

itemCollection = web.Lists["ListName"].Items;
item = itemCollection.Add();

// I arranged my controls in a table
// here is my one of people editor controls
// So after pressing submit, the account of this control should set
// new Item "Assigned To" field in the related list.
people = (PeopleEditor)Tbl.Rows[0].Cells[0].Controls[0];  
picker = (PickerEntity)people.ResolvedEntities[0];
userInf = new SPUserInfo();
user = web.EnsureUser(picker.Key);
item["Assigned To"] = user;

with this kind of coding my list start updating correctly 🙂 ! hope this help you …

Also here is some related links that helped me :