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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Lead type Company, attach contact
How do I do that?
[PHP]
//Add in the company details
$companyFields = array (
'isPerson' => false,
'entityId' => $customerId,
'companyName' => urldecode($_REQUEST["companyName"]),
'entityStatus' => new nsRecordRef(array('internalId' => $leadStatus)),
'leadSource' => new nsRecordRef(array('internalId' => '-3')),
'subsidiary' => new nsRecordRef(array('internalId' => '1')),
'unsubscribe' => 'FALSE',
'contactList' => array(
'contact' => array( //attach contact
'entityId' => $customerId."-INDV",
'firstName' => urldecode($_REQUEST["firstName"]),
'lastName' => urldecode($_REQUEST["lastName"])
)),
'customFieldList' => $entities,
'addressbookList' => array (
'addressbook' => array (
'addr1' => urldecode($_REQUEST["addr1"]),
'addr2' => urldecode($_REQUEST["addr2"]),
'city' => urldecode($_REQUEST["city"]),
[PHP]
//Add in the company details
$companyFields = array (
'isPerson' => false,
'entityId' => $customerId,
'companyName' => urldecode($_REQUEST["companyName"]),
'entityStatus' => new nsRecordRef(array('internalId' => $leadStatus)),
'leadSource' => new nsRecordRef(array('internalId' => '-3')),
'subsidiary' => new nsRecordRef(array('internalId' => '1')),
'unsubscribe' => 'FALSE',
'contactList' => array(
'contact' => array( //attach contact
'entityId' => $customerId."-INDV",
'firstName' => urldecode($_REQUEST["firstName"]),
'lastName' => urldecode($_REQUEST["lastName"])
)),
'customFieldList' => $entities,
'addressbookList' => array (
'addressbook' => array (
'addr1' => urldecode($_REQUEST["addr1"]),
'addr2' => urldecode($_REQUEST["addr2"]),
'city' => urldecode($_REQUEST["city"]),
0