This topic contains 1 reply, has 0 voices, and was last updated by tect22 7 years, 6 months ago.

  • Author
    Posts
  • #6416

    whitecloud

    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.

  • #6417

    tect22

    Hi whitecloud ,

    The value of endUserCustomFieldRef would only come up with the internalid of the customer record selected, from this you need to initialize the record to bring up the other details of the selected customer record.

    Regards,

    Tect

You must be logged in to reply to this topic.