I'm a newbie in NetSuite SuiteTalk API and i really have hard time to get simple results. I'm using the PhpToolKit provide by NetSuite. My Search is super simple, i want Budget list for a given Budget Category and Date. i'm able to do this search without problem into NetSuite and i've got results. I also did this Search in NetSuite with the login account i provide to the NsConfig.php without any right issues. Each time i submit this request i got an error message "INVALID_KEY_OR_REF" in the xml response. If someone got any Clue to help start with it.
Here my code:
<?php
require_once '../PHPToolkit_2018_1/NetSuiteService.php';
$service = new NetSuiteService();
$service->setSearchPreferences(false, 1000);
$BudgetSearch = new BudgetSearchBasic();
$CategorySearchField = new SearchMultiSelectField();
setFields($CategorySearchField, array('operator' => 'anyOf', 'searchValue' => 'Legacy'));
$BudgetSearch->category = $CategorySearchField;
$YearSearchField = new SearchMultiSelectField();
setFields($YearSearchField, array('operator' => 'anyOf', 'searchValue' => 'FY 2018'));
$BudgetSearch->year = $YearSearchField ;
$query = new SearchRequest();
$query->searchRecord = $BudgetSearch;
$BudgetResponse = $service->search($query);
if (!$BudgetResponse->searchResult->status->isSuccess) {
echo "SEARCH ERROR";
} else {
echo "SEARCH SUCCESS, records found: " . $BudgetResponse->searchResult->totalRecords;
}