- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2024 11:29 PM - edited 08-17-2024 12:08 AM
In the OOB Document Task : /nav_to.do?uri=sn_hr_sp_todos_config.do?sys_id=1bafd40c534010100ad0ddeeff7b1294, I created a custom sn_ex_sp_task_configuration with Tab Configuration set to the following:
The Widget being used is also OOB : /sp_widget.do?sys_id=ddf80bb253c700100ad0ddeeff7b124b. Also tried the "Document Task HTML" but returned the same error:
Reviewed the OOB Widget Server script and I did not find anything I've done wrong.
(function() {
if (input)
data.sys_id = input.sys_id;
else if (options && options.sys_id) {
data.sys_id = options.sys_id;
data.taskNumber = options.todoNumber;
} else
data.sys_id = $sp.getParameter("sys_id");
if (options) {
if (options.native_mobile == 'true')
data.isNative = 'true';
}
data.isMobile = gs.isMobile();
if (data.sys_id) {
data.reviewMessage = gs.getMessage("Review notes have been sent to one or more participants of the document template.");
data.approveMessage = gs.getMessage("Your task is complete.");
data.saveMessage = gs.getMessage("Your changes have been saved.");
data.loadingMessage = gs.getMessage("Loading...");
data.taskId = data.sys_id;
var docTaskUtils = new DocumentTaskUtils();
var taskInfo = docTaskUtils.getDocumentTaskDetails(data.taskId);
data.isPDFTemplate = taskInfo.isPDFTemplate;
data.action = taskInfo.action;
data.assigned_to_me = taskInfo.assigned_to_me;
data.assigned_to = taskInfo.assigned_to;
data.finished = taskInfo.finished;
data.document_task_type = taskInfo.document_task_type;
data.signed_pdf_document = taskInfo.signed_pdf_document;
data.state = taskInfo.state;
data.closed_at = taskInfo.closed_at;
data.stateDisplay = taskInfo.stateDisplay;
data.esc_task_status_options = {};
data.downloadAttachmentMessage = gs.getMessage('The signed documents can be <a href= "/sys_attachment.do?sys_id={0}">downloaded from here</a> .', [data.signed_pdf_document]);
if (!data.assigned_to_me) {
if (data.finished && !gs.nil(taskInfo.assigned_to))
data.caption = gs.getMessage("Completed by {0}", data.assigned_to.name.toString());
else {
if (gs.nil(taskInfo.assigned_to))
data.caption = gs.getMessage("Task is unassigned");
else
data.caption = gs.getMessage("Task assigned to {0}", data.assigned_to.name.toString());
}
}
var widgetOptions = {
sys_id: data.taskId,
native_mobile: data.isNative
};
if (data.document_task_type == "url" || data.document_task_type == "dynamic_url") {
data.isUrlTask = true;
if (data.finished)
data.esc_task_status_options = docTaskUtils.getTaskCompletionDetails(data);
else {
if (!gs.nil(taskInfo.signing_url))
data.signing_url = taskInfo.signing_url.toString();
if (data.document_task_type == "dynamic_url") {
var dynamic_url = docTaskUtils.getDynamicURL(data.taskId);
if (dynamic_url && /success/i.test(dynamic_url.status))
data.signing_url = dynamic_url.signing_url;
else {
gs.addErrorMessage(gs.getMessage("There was some error in generating the signing url."));
gs.error("Get Signing URL: {0}", dynamic_url.error_message);
}
}
}
} else if (data.isPDFTemplate && data.action != 'review')
data.pdfWidget = $sp.getWidget('document-task-pdf', widgetOptions);
else if (!data.isPDFTemplate)
if(data.finished && data.state ==7) {
data.esc_task_status_options = docTaskUtils.getTaskCompletionDetails(data);
} else
data.htmlWidget = $sp.getWidget('document-task-html', widgetOptions);
}
})();
I have tried the following Widget Parameters but none of it worked.
But hard-coding the sys_id of the document task worked.
What should be set in the {} for the current sn_doc_task?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 12:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 12:17 AM
Never mind, figured it out. It should be set to {table.sys_id}