Perry Auld
02/14/2025, 4:34 PMCeligo AI
02/14/2025, 4:34 PMAI generated answer (using internal Slack threads):Based on the conversations provided, it seems that the issue revolves around the instantiation of abstract types in NetSuite, specifically
SearchCustomField, SearchColumnCustomField, and SelectCustomFieldRef.
1. For the SearchCustomField issue, it seems that the user was trying to instantiate SearchCustomField directly, which is not allowed as it is an abstract type. Instead, the user should instantiate a specific type of SearchCustomField. Here is a corrected code sample:
php
$NSservice = new NetSuiteService();
$cs = new CustomerSearch();
$csb = new CustomerSearchBasic();
$customField = new SearchStringCustomField();
$customField->internalId = 'custevent_service_credit_deducted';
$customField->searchValue = '440';
$customField->operator = 'anyof';
$customFieldList = new SearchCustomFieldList();
$customFieldList->customField = array($customField);
$csb->customFieldList = $customFieldList;
$cs->basic = $csb;
$request = new SearchRequest();
$request->searchRecord = $cs;
$searchResponse = $NSservice->search($request);
In this code, SearchStringCustomField is used instead of SearchCustomField.
2. For the SearchColumnCustomField issue, the user was trying to instantiate SearchColumnCustomField directly, which is not allowed as it is an abstract type. Instead, the user should instantiate a specific type of SearchColumnCustomField. The user should specify the type of the custom field in the xsi:type attribute of the customField element in the SOAP request. For example, if the custom field is a boolean, the user should use SearchColumnBooleanCustomField.
3. For the SelectCustomFieldRef issue, the user was trying to change a SelectCustomFieldRef to a multiSelectCustomFieldRef. It's not as simple as changing SelectCustomFieldRef to multiSelectCustomFieldRef and passing an array instead of the internalID. The user would need to create a new MultiSelectCustomFieldRef object and assign an array of ListOrRecordRef objects to its value property.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/14/2025, 4:34 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805681586
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803924
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.781084538
Celigo AI
02/14/2025, 4:34 PM