onSubmit 检查是否有冲突修改,弹出对话框让user确定或者取消
// Warn when two users are editing the same recordfunction onSubmit() { var updatedOn = gel('onLoad_sys_updated_on').value; if (!updatedOn) return; var gr = new GlideRecord(g_form.getTableName()); if (!gr.get(g_form.getUniqueValue())) return; var dbUpdatedOn = gr.sys_updated_on + ''; var dbUpdatedBy = gr.sys_updated_by + ''; if (updatedOn != dbUpdatedOn) return confirm(dbUpdatedBy + " " + getMessage("updated this record since you opened it - overwrite with your changes? Additional comments and Work notes will not be overwritten."));}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。