Value is empty and 'get' function cannot be applied
I'm having a problem with a creator app and hoping someone can help me understand what's occurring. Our business creates lumber products for wholesale and we sell scraps as retail for firewood. We have a creator app that is meant to be our office Point of Sale for the firewood. The problem is that when we attempt to finish an "order" for a customer we get the following error - "Error in executing On Add - On Success script. Value is empty and 'get' function cannot be applied Line: (79)" The code in question is as follows (the bold line is line 79)
/*get invoice id for getting of invoice url*/
get_invoice = zoho.books.getRecordsByID("Invoices","643070839",varible_id.tostring());
get_invoice_invoice = get_invoice.get("invoice");
get_invoice_url = get_invoice_invoice.get("invoice_url");
/*send mail to the relevant customer*/
if(input.primary_contact_method == "Email")
Obviously this is only a small portion of the code, if you need more for reference I'm happy to provide, I'm just trying to determine what value is "empty" and how to fix this.