Open survey in HR workspace
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi Team,
We have UI action in native and when we click it lands to assessment metric page with survey questions. I displayed same ui action on HR workspace and i wanted to open this survey in workspace as well. How to modify the url that suits for workspace.
url native: assessment_take2.do?sysparm_assessable_sysid=493b67e72b0432109ee8f3404291bf65&sysparm_assessable_type=2bed6554c36f8e90d1455ebeb0013169
Workspace code:
function onClick(g_form) {
var rec = g_form.getUniqueValue();
var grSurveyAjax = new GlideAjax('sn_hr_core.bms_hr_CaseAjax');
grSurveyAjax.setScope('sn_hr_core');
grSurveyAjax.addParam('sysparm_name', 'createSurvey');
grSurveyAjax.addParam('sysparm_rec', rec);
grSurveyAjax.addParam('sysparm_usr', g_user.userID);
grSurveyAjax.addParam('sysparm_tbl', g_form.getTableName());
grSurveyAjax.getXMLAnswer(function(answer){
if (answer == "Survey already exists") {
g_form.addInfoMessage("Feedback Survey already exists for this case and user");
} else {
var instanceSys = answer;
var URL = '/assessment_take2.do?sysparm_assessable_sysid=' + instanceSys + '&sysparm_assessable_type=2bed6554c36f8e90d1455ebeb0013169';
window.open(URL, '_blank');
}
});
}
0 REPLIES 0