Field service module and the "sign & confirm" button in work order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 04:39 AM
Hello Team,
I installed the field service and i activate the button sign & confirm" in work order,
i created the same button i the work order task i used the ui action and i call the ui page from this button but i dont have any result when i click in this new button please advice. the objectif is to have all the fonctionaity of this button in the work order task.
UI Page:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_color_red">
var map = CSSPropertiesRepository.getSessionProperties();
map["$color-red"];
</g:evaluate>
<j:if test="$[jvar_isMSIE8 || jvar_isMSIE7]">
<g:requires name="scripts/flashcanvas.jsx" includes="true"/>
</j:if>
<j:if test="${GlideMobileExtensions.getDeviceType() != 'doctype'}">
<g:requires name="scripts/lib/jquery_includes.jsx" includes="true" />
</j:if>
<g:requires name="scripts/jquery.signaturepad.min.jsx" includes="true" />
<g:requires name="scripts/wo_signature_pad.jsx" includes="true" />
<!-- <g:include_script src="wo_signature_pad.jsdbx"/> -->
<g:requires name="styles/jquery.signaturepad.cssx" includes="true" />
<g:requires name="styles/heisenberg/heisenberg_all.cssx" includes="true" />
<g:requires name="scripts/classes/ajax/GlideAjax.jsx" includes="true" />
<g:ui_form>
<j:set var="jvar_sys_id" value="${RP.getWindowProperties().get('sys_id')}" />
<input type="hidden" id="sysparm_init_type" value="drawIt" />
<input type="hidden" id="sysparm_retrieve_signature" value="false" />
<input type="hidden" id="sysparm_line_top" value="100" />
<input type="hidden" id="sysparm_signeename_required" value="true" />
<input type="hidden" id="sysparm_draw_only" value="true" />
<input type="hidden" id="document_id" name="document_id" value="${RP.getWindowProperties().get('document_id')}"></input>
<input type="hidden" id="table_name" name="table_name" value="${RP.getWindowProperties().get('table_name')}"></input>
<div class="sigPad">
<j:if test="${sysparm_draw_only != 'true'}">
<div class="typeItDesc">
<label for="name">${gs.getMessage('Name')}</label>
<input type="text" name="signed_name" id="signed_name" class="signed_name" />
</div>
<div class="drawItDesc" style="display:block;">
<label for="signee_name" aria-label="${gs.getMessage('Name, mandatory')}">${gs.getMessage('Name')}<span style="color: ${jvar_color_red};">*</span></label>
<input aria-required="true" type="text" name="signee_name" id="signee_name" class="signed_name" />
</div>
<p class="typeItDesc">${gs.getMessage('Signature')}</p>
<label for='pad' aria-label="${gs.getMessage('Signature, mandatory')}" class="drawItDesc" style="display:block;">${gs.getMessage('Signature')}<span style="color: ${jvar_color_red};">*</span></label>
<ul class="nav nav-tabs sn-tabs-basic sigNav">
<!-- <li class="typeIt"><a href="#type-it" id='typeItLink'>${gs.getMessage('Type it')}</a></li> -->
<li class="drawIt" style="display:block;"><a href="#draw-it" id='drawItLink'>${gs.getMessage('Draw it')}</a></li>
<a class="clearButton" style="display:block;" href="#clear" id='clearButton'>${gs.getMessage('Clear')}</a>
</ul>
</j:if>
<j:if test="${sysparm_draw_only == 'true'}">
<p class="drawItDesc" style="display:block;">${gs.getMessage('Draw your signature')}</p>
<div class="sigNav" style="display:block;">
<!-- <a class="clearButton" href="#clear">${gs.getMessage('Clear')}</a> -->
</div>
</j:if>
<div class="sig sigWrapper" style="display:block;">
<div class="typed"></div>
<canvas class="pad" name="pad" id ='pad' width="400" height="150"></canvas>
<input type="hidden" aria-label="${gs.getMessage('Signature Image')}" name="current_sys_id" value="${jvar_sys_id}"/>
<input type="hidden" aria-disabled="true" name="output" class="output"/>
</div>
<p style="text-align:right; margin-top: 10px;"><a class="clearButton btn btn-default" href="#clear">${gs.getMessage('Clear')}</a></p>
<p/>
${gs.getMessage('Filling in the following information will constitute your eSignature and will have the same legal impact as signing a printed version of this document.')}
<div style="float:right">
<button id='cancelSignature' data-dismiss="GlideModal" onclick="return onCancelSignature();" class="btn btn-default" style="margin-right:10px;">${gs.getMessage('Cancel')}</button>
<button id='acceptSignature' onclick="return onAcceptSignature();" class="btn btn-primary">${gs.getMessage('Accept')}</button>
<input type="hidden" id="btn_clicked" name="btn_clicked" value="none"></input>
</div>
</div>
</g:ui_form>
</j:jelly>
processing script:
evaluate();
function evaluate() {
if (btn_clicked == 'cancel' )
current.setAbortAction(true);
if (btn_clicked == 'ok') {
response.sendRedirect(gs.getSession().getStack().bottom());
var message = gs.getMessage('The signature has been accepted');
gs.addInfoMessage(message);
}
}
- Labels:
-
Cost Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 06:39 AM
did you change the table name ? on the UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2019 09:18 AM
YES of corse, juste i duplicated the UI action and changing the table name.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 10:47 AM
I know this has been 9 months but I am in similar boat. But having to modify the PDF file (greatly). But make sure to alter the be GeneralWOForm script include. As you changed the main table that this functionality is being used within, you may need to change the table for main function that gets the GlideRecord of target record (current record). The funtion you need to look at is _getWOGr within GeneralWOForm.
Hopefully this helps you get where you need!