Amounts Field Auto Calculate Based on Products

Amounts Field Auto Calculate Based on Products

Hi All,

Trying to figure out how to auto popluate the amount field in deals from related products 

and visiting the link on how to create custom functions. 

https://help.zoho.com/portal/community/topic/custom-function-25-%c2%a0populate-the-amount-field-of-a-deal-by-calculating-the-number-of-related-products-and-its-unit-price

I keep getting error 

Error at line number: 1
Incompatible types for zoho.crm.getRelatedRecords function at argument index 3 <br/> Required : NUMBER <br/>Found : TEXT