Cannot create invoice through a form in Zoho Creator

Cannot create invoice through a form in Zoho Creator

Hello, 

I have created a form in Zoho Creator and I am trying to ask Zoho Invoice to create an Invoice. 
I am using the script code below (which I found in your help page: https://help.creator.zoho.com/create-zoho-invoice.html
input.Invoice_Detail_Status = zoho.invoice.createinvoice({ "CustomerName" : input.Customer_Name, "ItemName" : input.Item_Name, 
"ItemRate" : input.Item_Rate, "Quantity" : input.Quantity });
I get the following error when I am trying to save the script:
Error in statement at line number 1
The field input.Invoice_Detail_Status is of type STRING. But you are trying to update it with data of type MAP

The field Invoice Detail Status is a MultiLine.

I can only save the script if I change   zoho.invoice.createinvoice with  zoho.invoice._createinvoice

After saving the script with the change above, I am trying to create the invoice and I get the following error:

Error details:Error occured while on Success script.Error in creating invoice on invoking the task zoho.invoice._createinvoice

I would appreciate it very much if you could help me.