Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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)