Errors with isEmpty and toLong

Errors with isEmpty and toLong

I have some old code that just stopped working and nothing I am trying to do to fix it is helping.

first of all, I am getting an error of

for code that reads:

if(response.isEmpty() || response1.isEmpty())
{
alert "The Registration Number you entered wasn't found for that item – please check your registration number and try again or contact support.";
cancel submit;
}

When i try to save the script I get an error message of:

Improper Statement
Error might be due to missing ';' at the end of the line or incomplete expression 

The line identified for the error is the code: if(response.isEmpty() || response1.isEmpty())

I have also tried 
if(response.isEmpty() != false) 
and 
if(response.isEmpty() == false) 


with the same results.

This is stopping me from fixing a line that reads:

proupdate = zoho.crm.updateRecord("Products",proid.toLong(),{"Contact_Name":newcid.toLong()},{"Support_Start_Date":timestamp.toLong()});

when i submit my form, the program reaches this line and gives me the following error for the line:

 Error in executing On Add - On Validate script
 Value is empty and 'toLong' function cannot be applied Line:(86)


This used to work fine - was there a syntax change or something?

Thanks!
Kevin
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方