Update Products in Invoice using Custom Function, API or zoho.crm.updateRecord?

Update Products in Invoice using Custom Function, API or zoho.crm.updateRecord?

Hi,

I have some invoices which I want to update.  I need to update the Product Lines.

I can see how this is possible using the Request URL Method documented here>
https://www.zoho.com/crm/help/api/updaterecords.html.

However in the custom function I have tried to use the inbuilt function zoho.crm.updateRecord.

Howver it would appear that the function zoho.crm.updateRecord can only handled Key Value Pairs and not the nested pairs that would be required for adding Product Lines.

Can you confirm my undertsanding is correct and thta I need to using the Request URL Method to update.
Thanks