jagdish kunwar
03/10/2021, 5:31 AM"TypeError: Cannot call method \"getParameter\" of undefined (Contact Company from URL.js$1108550#5)",
Here is code sample
var objRecord = record.create({
type: record.Type.CONTACT,
isDynamic: true,
});
return objRecord;
battk
03/10/2021, 5:37 AMbattk
03/10/2021, 5:38 AMjagdish kunwar
03/10/2021, 5:39 AMbattk
03/10/2021, 5:42 AMjagdish kunwar
03/10/2021, 5:52 AMfunction addContact() {
var nameData = {
firstname: 'John',
middlename: 'Doe',
lastname: 'Smith'
};
var objRecord = record.create({
type: record.Type.CONTACT,
isDynamic: false,
defaultValues: null
});
objRecord.setValue({
fieldId: 'subsidiary',
value: '1'
});
for (var key in nameData) {
if (nameData.hasOwnProperty(key)) {
objRecord.setValue({
fieldId: key,
value: nameData[key]
});
}
}
var recordId = objRecord.save({
enableSourcing: false,
ignoreMandatoryFields: true
});
log.debug('contact : ', recordId);
}
I have this function on separate file like helper so that it can be called from userEventscript or Restlet script. When this function is called from userEventScript it works fine, but when calling the function from Restlet script I am getting the error.battk
03/10/2021, 5:53 AMbattk
03/10/2021, 5:53 AMbattk
03/10/2021, 5:54 AMbattk
03/10/2021, 5:54 AMbattk
03/10/2021, 5:55 AMbattk
03/10/2021, 5:55 AMjagdish kunwar
03/10/2021, 5:59 AMbattk
03/10/2021, 5:59 AMbattk
03/10/2021, 6:00 AMbattk
03/10/2021, 6:00 AMbattk
03/10/2021, 6:00 AMbattk
03/10/2021, 6:00 AMbattk
03/10/2021, 6:01 AMbattk
03/10/2021, 6:01 AM