Set Value of CRM lookup Field in Creator

Set Value of CRM lookup Field in Creator

I cant seem to figure out how to use deluge to set the value of a crm lookup field in my form.

The look up field refers to the crm Leads module.

I already have the lead id that the creator record is referring to in the crm but i dont know how to use this to set the creator crm lookup field.

How do i take the crm lead id and set a crm lookup field in creator?

The Deluge Name of my creator crm look up field is: Customer_Name
The Field ID Name is: Customer_Name_ID

If i use the following code the crm lead id is put into the creator field but it is not really tied to anything it isnt set right.

 input.Customer_Name = Sail_Details.Lead_ID;


If i use the following code noting seems to be put in the field:

input.Customer_Name_ID = Sail_Details.Lead_ID.tolong();


I have tried first fetching the record using the following but i still don't seem to be able to set the creator form field correctly. There are also error because happening on the second line of each set of code below that i cant correct.

CRMSearchResult = zoho.crm.searchRecords("Leads", "(Email |=| Client_Info.Email)");
input.Customer_Name_ID = CRMSearchResult.get(ID);

and

CRMid = zoho.crm.getRecordById("Leads", Sail_Details.Lead_ID.toLong()); 
input.Customer_Name_ID = CRMid.get(ID);


Thanks for all the help
Matt