I have a very simple JS script that is embedded into an email. The goal is to autopopulate the salutation of the email and is as follows.
if (Contact.Field("firstname") == "NULL") {
document.write(Contact.Field("custname"));
} else if (Contact.Field("firstname") == "") {
document.write(Contact.Field("lastname")"Household");
}
The problem I'm running into is that the script will still autopopulate the NULL value in the email instead of switching to the "custname" field when it runs. I'm sure this is due to user error, but if anyone could help steer me in the right direction I would greatly appreciate it. Thanks!