Here is the situation, I’m trying to get the sales data based on the sales rep id.
Here is what I have tried (of course failed)
$request->baseRef = new RecordRef(); $request->baseRef->internalId = 730; $request->baseRef->type = 'salesRep'; $getResponse = $service->get($request);
What will be the best way to the sale information based on the salesRep id?
Thank you, Kevin Davis
Advertisement
Answer
Found a solution….
The problem was that I have to do a multi-select field. So instead of doing what I did that is above, here is my solution:
$type = new SearchEnumMultiSelectField(); $type->operator = 'anyOf'; $type->searchValue = array('_salesOrder'); $search->type = $type; $salesRepRef = new RecordRef(); $salesRepRef->internalId = 730 $params = new SearchMultiSelectField(); $params->operator = 'anyOf'; $params->searchValue = array($salesRepRef); $search->salesRep = $params;
That returned the information that I needed.