Amber
04/08/2025, 10:11 PMCeligo AI
04/08/2025, 10:12 PMAI generated answer (using internal Slack threads):To upload and associate a contact record to the partner contact sublist, you would need to follow a two-step process as NetSuite does not allow direct linking of contacts to partners via CSV upload. 1. Create the Contact Record: You can create a contact record using SuiteScript's
record.create
method. Here is a sample code snippet:
javascript
var contactRecord = record.create({
type: record.Type.CONTACT,
isDynamic: true
});
contactRecord.setValue({
fieldId: 'firstname',
value: 'John'
});
contactRecord.setValue({
fieldId: 'lastname',
value: 'Doe'
});
var contactId = contactRecord.save();
2. Link the Contact to the Partner Record: After creating the contact record, you can then link it to the partner record using the setValue
method. Here is a sample code snippet:
javascript
var partnerRecord = record.load({
type: record.Type.PARTNER,
id: 'partnerId',
isDynamic: true
});
partnerRecord.selectNewLine({
sublistId: 'contactroles'
});
partnerRecord.setCurrentSublistValue({
sublistId: 'contactroles',
fieldId: 'contact',
value: contactId
});
partnerRecord.commitLine({
sublistId: 'contactroles'
});
partnerRecord.save();
Please replace 'partnerId'
with the actual ID of the partner record you want to link the contact to.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/08/2025, 10:12 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828992724
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828012586
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827218
Celigo AI
04/08/2025, 10:12 PMCeligo AI
04/10/2025, 5:11 AM