I tried to set the value of a contact selector on the change of an drop down list. I us ethe following code to set the contact selector.
root.SelectSingleNode(
"/my:myFields/my:Categorie/my:Behandelaar/my:gpContactSelector/my:Person/my:DisplayName", NamespaceManager).SetValue(beheerderOpgemaakt);
root.SelectSingleNode("/my:myFields/my:Categorie/my:Behandelaar/my:gpContactSelector/my:Person/my:AccountId", NamespaceManager).SetValue(beheerderOpgemaakt);
beheerderOpgemaakt contains an accountId like domain\name
I get an 5337 error message when i tried to do this.
If i set the value of an textfield instead, everything works fine. It also works fine when i test it in InfoPath preview mode.
The contact selector is working fine when i fill out a name and then check that name against AD.
The name that is set in to the contact selector does not have to be checked against AD. But it has to be an contact selector, because the next the form is opened it must be possible to select someone with the contact selector from AD.
Does anyone have an idea of what i am doing wrong?