Discussions
Set Status on phone call record just created
I have created a phone call record to log a call when required when a Contact record is saved using an After Submit Scipt.
I can set all the fields I want except the status to 'Completed' rather than the default of 'Scheduled'.
Sample code with carious attempts commented out below. any ideas?
recordCreated.setFieldValue('title',title );
recordCreated.setFieldValue('organizer', salesrep);
recordCreated.setFieldValue('contact', contact_id);
recordCreated.setFieldValue('phone', phone);
//recordCreated.setFieldValue('priority', 'high'); this did not work either??!!
recordCreated.setFieldValue('message',comments);
//set field Values - for multiselect field
var state = new Array(1);
state['0'] = 'completed';
//recordCreated.setFieldValues('status', state); 3rd attempt