netsuite
Begär customField, customFieldList & customSearch Gå med med PHP API Advanced Search
Sök…
Introduktion
Dessa var några av de svåraste sakerna (och minst pratade om) att göra med PHP API avancerad sökning (där du anger vilka fält).
Jag är i processen att migrera till rest_suite github-biblioteket som använder RESTLET och komma runt PHP API-användarens samtidighetsgräns på 1.
Men innan jag tar bort min gamla kod jag lägger upp den här. Exempelspecifikationer för dessa fält kan hittas här: http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_1/schema/search/transactionsearchrow.html?mode=package
customField & customFieldList Användning
$service = new NetSuiteService();
$search = new TransactionSearchAdvanced();
$internalId = '123';//transaction internalId
$search->criteria->basic->internalIdNumber->searchValue = $internalId;
$search->criteria->basic->internalIdNumber->operator = "equalTo";
$field = new SearchColumnSelectCustomField();
$field->scriptId = 'custbody_os_freight_company';//this is specific to you & found in netsuite
$search->columns->basic->customFieldList->customField[] = $field;
$field = new SearchColumnStringCustomField();
$field->scriptId = 'custbody_os_warehouse_instructions';//this is specific to you & found in netsuite
$search->columns->basic->customFieldList->customField[] = $field;
//and so on, you can keep adding to the customField array the custom fields you want
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
anpassadSearchJoin Användning
$service = new NetSuiteService();
$search = new TransactionSearchAdvanced();
$internalId = '123';//transaction internalId
$search->criteria->basic->internalIdNumber->searchValue = $internalId;
$search->criteria->basic->internalIdNumber->operator = "equalTo";
$CustomSearchRowBasic = new CustomSearchRowBasic();
$CustomSearchRowBasic->customizationRef->scriptId = 'custbody_os_entered_by';//this is specific to you & found in netsuite
$CustomSearchRowBasic->searchRowBasic = new EmployeeSearchRowBasic();
$CustomSearchRowBasic->searchRowBasic->entityId = new SearchColumnStringField();
$search->columns->customSearchJoin[] = $CustomSearchRowBasic;
//and so on, you can keep adding to the customSearchJoin array the custom fields you want
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
Modified text is an extract of the original Stack Overflow Documentation
Licensierat under CC BY-SA 3.0
Inte anslutet till Stack Overflow