Closed zang closed 7 years ago
searchFromField
is a method from this class:
Not from Deals
. So you should be using:
$pipedrive->searchResults->searchFromField(...);
$response = $pipedrive->searchResults->searchFromField($test_term, "text", "title"); //tried both text and Text but got the same errors as shown below
PHP Fatal error: Uncaught exception 'Devio\Pipedrive\Exceptions\PipedriveException' with message 'Field_type not supported.' in /home/project/devio/pipedrive/src/Http/Request.php:85\nStack trace:\n#0 /home/project/devio/pipedrive/src/Http/Request.php(62): Devio\Pipedrive\Http\Request->handleResponse(Object(Devio\Pipedrive\Http\Response))\n#1 /home/project/devio/pipedrive/src/Http/Request.php(47): Devio\Pipedrive\Http\Request->executeRequest('get', 'searchResults/f...', Array)\n#2 /home/project/devio/pipedrive/src/Http/Request.php(128): Devio\Pipedrive\Http\Request->performRequest('get', 'field', Array)\n#3 /home/project/devio/pipedrive/src/Resources/SearchResults.php(44): Devio\Pipedrive\Http\Request->__call('get', Array)\n#4 /home/project/devio/pipedrive/src/Resources/SearchResults.php(44): Devio\Pipedrive\Http\Request->get('field', Array)\n#5
If you go to the API documentation, you can see that you hage to specify one of these in the field_type
parameter:
Plus any other option you wish.
The results from the following function returns NULL. Any idea? thanks
$pipedrive->deals->searchFromField("Search Term", "Text", "title");