Campaign Channel
The campaign channel record helps you refine the campaign channel for a marketing campaign.
For help working with this record in the UI, see Campaign Channels.
The internal ID for this record is campaignchannel.
This record contains the following subrecord: eventtype
For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.
Supported Script Types
The campaign channel record is scriptable in both client and server SuiteScript.
Supported Functions
The campaign channel record supports the following functions: create, read, update, and delete. The following functions aren't supported: copy, search, and transform.
Prerequisites
You must enable the Marketing Automation feature before you can use this record with SuiteScript. For more information, see Marketing Automation Overview.
Additional Details
The eventType field can't be updated.
Code Samples
The following samples show common actions with campaign channel scripting.
Create script example:
var record = nlapiCreateRecord('campaignchannel', true);
record.setFieldValue('description', 'Test description');
record.setFieldValue('name', 'Test name');
record.setFieldValue('inactive', 'F');
record.setFieldText('eventtype', 'Direct Mail');
var recordId = nlapiSubmitRecord(record);
Update script example:
record = nlapiLoadRecord('campaignchannel', recordId);
record.setFieldValue('description', 'Test description updated');
record.setFieldValue('name', 'Test name updated');
record.setFieldValue('inactive', 'T');
recordId = nlapiSubmitRecord(record);
Delete script example:
nlapiDeleteRecord('campaignchannel', recordId);