How to update a lookup field in Zoho CRM

How to update a lookup field in Zoho CRM

Hi,

I have a custom module. I have custom look-up field in contacts module that is related to a custom module. Whenever a new record is created in that custom module I want to get the ID of the newly created record and update the ID in the Contacts Module. I tried to do this in custom functions. I can get the ID of the newly created record but when I try to pass that ID to the custom lookup of contact module it doesnt work. Am I missing anything? Is there any other ways to achieve this functionality? Your help is appreciated.