Using the following I can add a new customer with status as Closed-Won:
Dim oCustomer As New Netsuite.Customer
Dim oStatus As New Netsuite.RecordRef
Dim oResponse As New Netsuite.WriteResponse
...fill in other customer info...
oStatus.internalId = "13" 'Closed Won
oCustomer.entityStatus = oStatus
oResponse = oNetsuiteService.add(oCustomer)
How do I make the customer listed as a qualified lead? I tried changing values above based on documentation and also tried adding oCustomer.Stage property but just received errors like this:
- <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Header>
- <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2008_2.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_861697_122720082063477427381214955_d99c2d19c4e6b</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
- <soapenv:Body>
- <addResponse xmlns="urn:messages_2008_2.platform.webservices.netsuite.com">
- <writeResponse>
- <platformCore:status isSuccess="false" xmlns:platformCore="urn:core_2008_2.platform.webservices.netsuite.com">
- <platformCore:statusDetail type="ERROR">
<platformCore:code>INVALID_KEY_OR_REF</platformCore:code>
<platformCore:message>Invalid entitystatus reference key 18.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</writeResponse>
</addResponse>
</soapenv:Body>
</soapenv:Envelope>
Thanks in advance for your assistance....
Scott