Hey all,
I’ve got a prepare_save_data function in a multi tick box widget (see below). I’m using this in a case process and when complete is done the function doesn’t run. This does run when it’s in in a form.
Does anyone know how to get prepare_save_data to fire off in the case process?
prepare_save_data: function(payload) {
// Get all the details for the checkbox object I only need properties but I'm keeping the rest to be used later
const checkbox_object_id = cs.path_info(widget.get_setting('checkbox_object')).target_object_id;
const blank_record = cs.record(0);
const checkbox_schema = blank_record.schema(checkbox_object_id);
const checkbox_properties = checkbox_schema.properties;
let save_data = [];
for (let key in checkbox_properties) {
if (checkbox_properties.hasOwnProperty(key)) {
save_data[checkbox_properties[key]] = payload[checkbox_properties[key]];
}
}
cs.log('prepare save data');
cs.log(save_data);
cs.log(checkbox_properties);
return save_data;
}