Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
How to set customer status (entityStatus) to prospect?
Hi,
What I want to do is to set the customer status in an add operation. By default, customers are always added as Closed-Won. I want to have a choice to add them as Prospects. It was suggested to set the entityStatus property in an older discussion so I tried to change the entityStatus property of a customer record:
RecordRef statusrec = new RecordRef(); statusrec.type = RecordType.customerStatus; statusrec.typeSpecified = true; statusrec.internalId = "7"; cust.entityStatus = statusrec;
When it comes to adding this customer, it fails with an error "That record does not exist." Without the code above, it adds fine. I took that internal ID (7) from the source code of one of the customer pages in UI. There was a javascript array for customer status field with all the IDs. I am not 100% sure about the record type either.
0