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
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