Using get from CRM fuction in a subform

Using get from CRM fuction in a subform

Hi
I am struggling to get code to work in a subform. I want to use grab data from our CRM system to populale a Subform. I have built a form populated it with this code

crmresp = zoho.crm.getRecordById("Invoices", input.Invoice_ID);

input.Total = (crmresp.get("Grand Total")).toDecimal();

When I test it in the main form it works but when I use it in a subform it does nothing. Is this a error/limitation in the system?

Cheers

Dan