Invalid Module Error when executing a function

Invalid Module Error when executing a function

Hi,

I am writing a function which collects data from my custom module & uses this data to create a record in the "Invoices" module. 

I think i have written the function accurately enough. It is retrieving the information from my custom module but when trying to create a new record in the Invoices module i am getting an error (see attached screenshot).

This function is part of a workflow rule. i am using the below deluge script line to create a new record:  record=zoho.crm.createRecord("Invoices",newInvoice);

And "newInvoice" contains the JSON object.

Regards,
Chetan