Enterprise Custom Field data for a specific user

G

Gene Berger

I am attempting to get the list of Enterprise Custom Fields for
a specific user ( CheckedBox = Check for User can be assigned as a resource in PWA - Manager User)

In the code below:

"resource in resources.Resources" returns a list of users
that are registered in PWA - Manage User

I know that #1 works because I can see resource.RES_Name = "each users name".

The line of code:
var customFields = resource.GetResourceCustomFieldsRows();
returns nothing although it should be returning a list of
Enterprise Custom Fields data for this user.

Why is it returning nothing?


private static ResourceDataSet.ResourcesRow FindEmployee(string employeeID)
{
//_resourceService.ReadResources
ResourceDataSet resources = _resourceService.ReadUserList(ResourceActiveFilter.All); <== it works
foreach (ResourceDataSet.ResourcesRow resource in resources.Resources) <== it works #1
{
var customFields = resource.GetResourceCustomFieldsRows(); <== returns nothing
foreach (ResourceDataSet.ResourceCustomFieldsRow custom in customFields) <== thus never loops
{
if (custom.MD_PROP_NAME == MAIN_CUSTOMFIELD &&
custom.TEXT_VALUE == employeeID)
return resource;
}
}

return null;
}


I have checked everywhere for an answer.
Thanks for any help you can provide.
Gene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top