Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
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)