The field value can be assigned in several ways.
Field of the Single type:
// Specify an email address without specifying the type Context.data.client_email = Context.fields.client_email. create('username@example.com');
// Specify an email address, specifying the typeContext.data.client_email = {
type: EmailType.SomeType,
email: 'username@example.com'
};
For a field of the Multiple type:
// Specify an email address without specifying the type Context.data.client_email_list = Context.fields. client_email_list.create('username@example.com');
// Specify an email address, specifying the typeContext.data.client_email_list = Context. fields.client_email_list.create('username@example.com', EmailType.SomeType);
Email
The field value can be assigned in several ways. Field of the Single type:
// Specify an email address without specifying the type Context.data.client_email = Context.fields.client_email. create('username@example.com');
// Specify an email address, specifying the type Context.data.client_email = { type: EmailType.SomeType, email: 'username@example.com' };
For a field of the Multiple type:
// Specify an email address without specifying the type Context.data.client_email_list = Context.fields. client_email_list.create('username@example.com');
// Specify an email address, specifying the type Context.data.client_email_list = Context. fields.client_email_list.create('username@example.com', EmailType.SomeType);
// Specify several email addresses, specifying the types Context.data.client_email_list = [ { type: EmailType.Home, email: 'username001@example.com' }, { type: EmailType.Main, email: 'username002@ example.com' }, { type: EmailType.Work, email: 'username003@example.com' } ];
Please note that in scripts, email addresses are not validated.