var userID = $Crm.user.id;
var userName = $Crm.user.first_name; // + " " + $Crm.user.last_name;
var module = $Page.module;
var module_recordID = $Page.record_id;
var recordName = $Page.record._Full_Name;
/*var currentdate = new Date();
var timesettings = { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric',minute: 'numeric', second: 'numeric',hour12: true, timeZoneName: 'short' };var formattedDateTime = currentdate.toLocaleTimeString('en-US',timesettings); console.log("time ::::::: ", formattedDateTime); */
var map = { "Viewed_By": "Last Viewed by - " + userName + " \n " };
var map = { "Last_Viewed_User_ID": +userID};
console.log("User id new : " +userID)
// + formattedDateTime
//console.log(map);
var datalist = [];datalist.push(map);var param = { "data": datalist };
//console.log("param: ", param);
var response = ZDK.Apps.CRM.Connections.invoke("crmconn", "https://zohoapis.com/crm/v5/"+module+"/"+module_recordID, "PUT", 2, param, {});
//console.log("Response : ", response);
Comments