I have a small application that iterates over the results of a \"Saved Search\" retrieving the values from several Custom Columns(simplified example):
var re
I tried the answer posted by @Adud123 and it works great, Here's what the code looks like:
public Dictionary> getCustomFieldLists()
{
return
nsService.search(new CustomListSearch())
.recordList.Select(a => (CustomList) a)
.ToDictionary(a => a.internalId,
a => a.customValueList.customValue
.ToDictionary(b => b.valueId, c => c.value));
}
var valueLookup = getCustomFieldLists();
var results = searchResults.Select(a => new
{
Z = (a.basic.customFieldList.Where(b => b.scriptId == "custentityZ")
.Select(a => (SearchColumnSelectCustomField)a)
.Select(a => valueLookup[a.searchValue.typeId][a.searchValue.internalId])
.First()
}