Skip to main content

Database Error: Cannot set 'value' as 'undefined' (SourceFile#107)

Comments

1 comment

  • Prajakta

    This error usually indicates that the value that you are trying to assign, viz. the email address is actually not present in the database. Maybe in some of your database records the email address column is blank, so the business rule is trying to assign values when there are no values in the result set and failing there.

    You can avoid this error by checking if the value that you are trying to assign really exists. For e.g you can change your assignment statement like this:

    if(x.resultSet[0].contactemailaddr) 
         vendorEmail.value = x.resultSet[0].contactemailaddr;
    else
         vendorEmail.value = null;
    0

Please sign in to leave a comment.