Does anyone know what this error message means? S...
# suitetalkapi
a
Does anyone know what this error message means? SearchColumnCustomField is an abstract type and cannot be instantiated For reference, I am trying to pull custom fields in on a vendor advanced search in SOAP
n
Found this thread on SO Looks like you need to add the field type to the front of the custom field name. ex: StringSearchColumnCustomField
a
<soap-env:Body> <search > <searchRecord xmlns:ns13="urn:relationships_2020_2.lists.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns13:VendorSearchAdvanced"> <criteria> <basic> </basic> </criteria> <columns> <basic> <terms/> <is1099Eligible/> <customFieldList> <customField internalId="2985"></customField> </customFieldList> </columns> </searchRecord> </search> </soap-env:Body>
I am not quite sure how to implement that here- any tips?
I had also seen that stackoverflow post but was having issues trying to implement
b
you will want to have a basic understanding of what an abstract class is
the customField element is a SearchColumnCustomField which is an abstract element that nesuite cant desterialize into a java class
you need to specify which type of element the customField element is
it has to be one of the types that extend the SearchColumnCustomField
hopefully you are using a library that helps out here, but if you are doing this by hand, then you need to go the core types xsd and find the type name of the element that matches the custom field you are looking for
for example, if it was a checkbox (boolean) field, you would be looking for SearchColumnBooleanCustomField
a
This is super super helpful thank you! I know the custom field type is a booleancustomfieldref
b
whatever the type name is, you would place that in the xsi:type of the customField element to specify its type