码迷,mamicode.com
首页 > 其他好文 > 详细

onSubmit 检查是否有冲突修改,弹出对话框让user确定或者取消

时间:2019-01-11 14:18:44      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:submit   pre   note   name   code   comm   ble   comment   检查   

// Warn when two users are editing the same record function 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.")); }

onSubmit 检查是否有冲突修改,弹出对话框让user确定或者取消

标签:submit   pre   note   name   code   comm   ble   comment   检查   

原文地址:http://blog.51cto.com/13716461/2341479

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!