Hi,
I do a basic search through code (not saved search) for my custom record called Installed Base and I would like to get the value of the End User field (its basically a list/record field type of Customer) from the search result.
Basically I’m doing a basic search to Installed Base custom record and I’ve been struggling to get the value which is being selected in the End User field – which is a list/record field type and source of Customer.
Here is what I have and it return the type of the field instead of the value:
foreach (CustomFieldRef customFieldRef in ib.customFieldList)
{
if (customFieldRef is SelectCustomFieldRef)
{
SelectCustomFieldRef endUserCustomFieldRef = (SelectCustomFieldRef)customFieldRef;
if (endUserCustomFieldRef.scriptId.Equals(“custrecord _dsg_slno_end_user”))
{
if (!String.IsNullOrEmpty(endUserCustomFieldRef.value .ToString()))
{
Console.WriteLine(“End User: ” + endUserCustomFieldRef.value.ToString());
}
}
}
}
Thanks in advance.
This is a cached copy. Click here to see the original post.