Linking Modules

Linking Modules

Hello,
Is it possible to create a workflow that triggers field updates in a linking module? For example if the field 'Appointment Status' is edited in the Appt Module, I want it to auto update in the linking module 'ApptLink'. I have a Grab button but I need this to happen automatically when a field is changed. The code I wrote is throwing back error. Any help would be fantastic! Thank you.

Failed to execute function

·       Argument type mismatch - Found 'TEXT' but Expected '[BIGINT]' for the function '756' Line Number:3


datasrc1 = zoho.crm.getRecordById("Appts",apptId);
fun = Map();
fun.put("Appointment_Status",ifnull(datasrc1.get("Status"),""));
fun.put("Appointment_Date",ifnull(datasrc1.get("Appointment_Date"),""));
automate = zoho.crm.updateRecord("ApptLink",apptlinkId,fun);
info fun;
info automate;