Tip 10: Did you get an error “One or more cc emails are not valid” while running workflow in Netsuite??

While working on a requirement for sending email using workflow, I got an error

One or more cc emails are not valid.

I searched it in SuiteScript Error, but nothing helped.

Setting of CC field:

My requirement was to send email to cc emails which will be dynamic depending upon what user selects. So, I set the CC field(in Send Email action of workflow) value as internal ID of a field({custbody_cc_emails}), which holds multiple emails separated by comma.

When do I get the error:

While testing, I got to know that, I get the error, when user doesn’t select any email for CC. So custbody_cc_emails field is blank.

How to overcome the error:

I never get error on sending email, when the CC field is blank. They why error is coming, when the custbody_cc_emails field value is blank. It should simply carry the null value to CC field in Send Email action.

The Reason is still unknown to me.

But I found the way to get rid of that error, as User may or may not select the CC field({custbody_cc_emails}) in Transaction record. So we need the workflow to be worked in both the situations.

My Approach:

I have updated the Send Email action by setting condition formula as {custbody_cc_emails} is not null.

In this case CC field value is {custbody_cc_emails}.

I have created another Send Email Action, where I set the condition formula as {custbody_cc_emails} is null and left the CC field in Action as blank.

In this way, 1st Send Email action will be executed, when “custbody_cc_emails” field is not blank, and 2nd Send Email action will be executed when “custbody_cc_emails” field is blank.

Isn’t it cool 🙂

Thanks,

Asha

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s