Skip to main content
Hi All

I am working on a task management application. The first .aspx page queries active directory for a list of users in a specific security group, and presents the results in a K2DropDownList. The list is bound to a Process Data Field called "Responsibility". When the form is submitted, a Sharepoint workspace is created and the details are written to a list. I know that the list event is working properly, as the task name, url, and operational dates all get written to the list.

The list has a column called "Assigned To" and it's data type is "User". My list event is supposed to write the K2.ProcessInstance.Datafield("Responsibility") to this "Assigned To" field name.

However, it's not working. Nothing is written and no error message is thrown. Everything else gets written to the list, just not the user name. Any suggestions on where I might be going wrong?

Many thanks,

Rich
I am not sure why it is not working but what you might try as a workaround is to use a regular ASP dropdownlist and have the selected index changed event write the selected value to a hidden K2textbox control that is bound to the Responsibility datafield.

I hope this helps.
Thanks for the tip k2eric.

I can see now (I have written all the form fields to console after this activity) that the username is getting passed through to sharepoint, just in the wrong format.

At the moment my asp script obtains the username as "sAMAccountName", ie "richard.markiewicz". I believe what it needs to pass through is a fully-qualified name, eg "domain
ichard.markiewicz".

Any thoughts on how to do this? Can I hard-code the domain around "sAMAccountName", or should I use a different call to AD?

Many thanks

Rich
Never a good idea to hard code something like a domain name. I'm not 100% sure but I think you should be able to extract the Domain and Username from the 'distinguishedName' property.

Regards,
Ockert
Thanks Ockert.

I have already tried using distinguishedname, but that gives the result:

richard.markiewicz@[domain].com

What I really need is [domain]
ichard.markiewicz.

Any further suggestions?

Many thanks again,

Rich

Reply