Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Search Opportunities by specific STATUS
Hi, I'm trying to search for Opportunities on a specific status, but an error is ocurring. I'm not sure witch value has to be sended on
status.searchValue = new string[] { _OPORTUNITY_STATUS }; (see below)
The code I'm using is the following:
private const string _OPORTUNITY_STATUS = "13";
public List<string> ReadOportunities()
{
List<string> oportunityNames = new List<string>();
OpportunitySearch searchBuffer = new OpportunitySearch();
OpportunitySearchBasic searchBasicBuffer = new OpportunitySearchBasic();
SearchEnumMultiSelectField status = new SearchEnumMultiSelectField();
status.@operator = SearchEnumMultiSelectFieldOperator.anyOf;
status.operatorSpecified = true;
status.searchValue = new string[] { _OPORTUNITY_STATUS };
searchBasicBuffer.status = status;
searchBuffer.basic = searchBasicBuffer;
SearchResult response = this.Service.search(searchBuffer);
if (response.status.isSuccess)