我已经看到其他开发人员创建了电子邮件通知,并嵌入了调查的第一个问题。https://community.servicenow.com/community?id=community_question&sys_id=32f20ba1dbd8dbc01dcaf3231f961948
在我的例子中,我发送了5个笑脸,从非常不满意(1)到非常满意(5)。当客户点击时,每个笑脸都有一个评级/得分。单击它时,我希望调查评分填充到调查表单上相应的评分中,然后允许用户完成其余问题。
我有通知工作,每个笑脸都有与适当的等级参数调查的网址链接。我没有使用gelly或DOM的经验。有没有人可以分享我可以用来实现这一点的适当代码?或者把我引向正确的方向?这是非常感谢的。Notification Email
发布于 2018-07-20 23:23:17
所以这听起来很像这个ask。我回答了这个问题,并把它发布到了我的blog here上。
几乎你需要在电子邮件中用url参数动态链接,并处理重定向,如果有任何或消息;这可以工作,如果你的链接是以下格式;
https://instance.service-now.com/custom_survey_response.do?response=1&incident=INC12345
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate var="jvar_unwrapped_url" jelly="true">
var currentUser = gs.getUserID();
var incidentFromURL = RP.getParameterValue('incident');
var responseFromURL = RP.getParameterValue('response');
var link = '';
var incident = new GlideRecord('incident');
if(incident.get('number', incidentFromURL)) { //found incident
// query survey tables, and do an insert on appropriate tables
// currentUser is string of user sys_id,
// incident is gliderecord of incident
// responseFromURL is the numeric value set by the url param in your notification
}
</g2:evaluate>
${gs.getMessage("Thanks for your response")}
</j:jelly>https://stackoverflow.com/questions/51431880
复制相似问题