I'm running a custom record search and wanting to ...
# suitetalkapi
b
I'm running a custom record search and wanting to return the text value for select fields on the record. I have done that for several fields that reference standard records (customer, employee, department) using
CustomSearchRowBasic
objects. So far I can't figure out how to use that for fields that reference custom lists. I have tried the following which produces an invalid reference error. It also seems to be joining to the custom list record and not the list values.
Copy code
CustomSearchRowBasic csrbStatus = new CustomSearchRowBasic {
  customizationRef = new CustomizationRef { scriptId = "custrecord_status" },
  searchRowBasic = new CustomListSearchRowBasic { name = new SearchColumnStringField[] { new SearchColumnStringField() } }
};
Is this the right approach? What am I missing? Thanks in advance for any suggestions.
b
Joining Through Custom Fields is used for custom fields that create a join
you can see which one of those are available in the ui when you create a saved search for your record
a custom field that references a custom list doesnt create a join, so you wont be able to access it via a CustomSearch
you can do a search on the custom list to get all its values, and then use the normal custom field list to match the internal id from the column to the custom list search
b
Thanks for the reply. It makes sense that custom list fields don't create joins but it would also make sense for the response to include both name and id values for those fields. I've used the approach of retrieving a custom list for use as a lookup elsewhere. It's just a pain when dealing with a custom record that has a bunch of list fields. I was hoping for a better option. Oh well. Again I appreciate confirming the situation. Thanks.