ZCRM API insertRecord notes error
Hi, I am trying to insert a lead into ZCRM and then insert a note related to this lead. I am following this tutorial
https://zohocrmapi.wiki.zoho.com/insertRecords-Method.html and using Java example.
I am able to insert a lead record, but fail to insert note.
The error i am getting is:
- <response uri="/crm/private/xml/Notes/insertRecords">
- <error>
- <code>4401</code>
- <message>Unable to populate data, please check if mandatory value is entered correctly.</message>
- </error>
- </response>
My lead XMLDATA is
- <Leads>
- <row no=\"1\">
- <FL val=\"Company\">Web Download</FL>
- <FL val=\"Last Name\">Scott</FL>
- <FL val=\"Email\">test@test.com</FL>
- <FL val=\"Phone\">1234567890</FL>
- <FL val=\"Contact Owner\">steve</FL>
- <FL val=\"Description\">test</FL>
- </row>
- </Leads>
and my note XMLDATA is
- <Notes>
- <row no="1">
- <FL val="entityId">1</FL>
- <FL val="Note Title">Zoho CRM Sample Note</FL>
- <FL val="Note Content">This is sample content to test Zoho CRM API</FL>
- </row>
- </Notes>
My only doubt is that maybe the value of entityId is incorrect. I am guessing that because I only import one lead its id will 1. I understand it's a naive assumption, so I've tried to retrieve lead's id from ZCRM by exporting the only lead and then using LeadId value from xls. This didn't work. So how do i import notes and relate them to leads?
Thank you