Issue copying notes from Lead to Contact/Deal

Issue copying notes from Lead to Contact/Deal

Hello, 

I'm currently writing a script that copies fields from the Lead module (incl. Notes, Tasks and Events), creates a Contact and Potential and copies all the fields across.

The function for creating the Contact/Deal and copying the fields is working fine, however I'm coming up with an issue when trying to copy the Notes, Tasks and Events across.

For the Notes specifically, I am getting the error as per the attached screenshot, and I am using the script as per below:

id = createContact.get("Id");
contactRelNotes = zoho.crm._getRelatedRecords("Notes","Leads",leadID);
countVal = 0;
for each  ele in contactRelNotes
{
countVal = countVal + 1;
notemap = Map();
notemap.put("entityId",id);
notemap.put("Note Title",ifnull(ele.get("Title")," "));
notemap.put("Note Content",ifnull(ele.get("Note Content")," "));
notemap.put("SMOWNERID",ifnull(ele.get("SMOWNERID")," "));
notemap.put("SMCREATORID",ifnull(ele.get("SMCREATORID")," "));
notecreate = zoho.crm.create("Notes",notemap);
}

Please can someone help me with this, as I don't understand which "Mandatory" field I am missing?

Thank you.

Josh