任何人都知道如何将附件强制添加到 SharePoint 自定义列表中?我们正在使用 SharePoint 2007。
问问题
3586 次
3 回答
1
UI / Admin 中没有任何内容可以执行此 AFAIK。
这篇文章解释了如何使用 jQuery Link来实现它
编辑以更正我之前的答案,经过反思,该答案仅提供了部分答案。上面的链接是实现此目的的正确方法。它展示了在NewForm上查询附件详细信息的机制,即:在创建列表项之前,这是可以应用强制功能的点。
于 2012-02-13T10:50:41.467 回答
0
将以下函数作为脚本添加到“内容编辑器 Web 部件”中,或通过 SharePoint 设计器直接添加到表单中。显然,这也需要jQuery。
function PreSaveAction(){
var hasAttachment = false;
//There are more then one fileupload inputs on the form
//and one of them will always be blank
$("input[name^='fileupload']").each(function() {
if ($(this).val() != "") {
hasAttachment = true;
}
});
if (hasAttachment){
return true; //OK to save
}else{
alert('An attachment is required!');
return false; //Prevents user from saving
}
}
于 2013-12-26T16:29:39.757 回答
-1
更好地创建工作流程
这将发送一封邮件到最后修改者 + cc 团队负责人
"如果当前项目有附件 = 否" 发送邮件
于 2012-09-27T11:10:35.573 回答