Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to use signature pad in service portal page?

Felix20
Mega Guru

Hallo everybody,

I'm working on a PoC and one requierement is to sign a table entry (request).

So user will have to fill a form and finally sign it using a signature pad. I saw there is a plugin: com.snc.signaturepad which activates a UI Page which contains a signature pad.

But how to use that UI Page as part of a widget in Service Portal?

Because our page will be face to customer, we dont want to our customer to be in backend so sign the filled form.

I searched long time and haven found a solution yet.

e-Signature is not a possibility, because we need it manually signed and username + password is not an option.

 

Best regards,

1 ACCEPTED SOLUTION

Ragini Kukade
Kilo Guru

Hi,

Hope the following link will help you:

https://sc.service-now.com/snds?state=widget-detail&sys_id=c292430f13a97a002ea1b2566144b0d4

Mark it as correct/helpful,if it helps.

Regards,

Ragini

View solution in original post

25 REPLIES 25

Thanks for confirming Kiran. For wider community, here is the code used to merge signature on generated pdf.

    //Signature starts from here
    var requestor = new sn_pdfgeneratorutils.PdfMergeSignRequestor;

    //Set signature sizes and page number for signature placement
    var page = 2;
    var leftMargin = 195;
    var topMargin = 190;
    var signatureWidth = 140;
    var signatureHeight = 70;
    var targetAttachmentForSign = result.attachment_id;

    //Getting Sign attachment sys id
    var sign_sysid = '';
    var attach = new GlideRecord('sys_attachment');
    attach.addQuery('table_name', '<table where signature is added as attachment>');
    attach.addQuery('table_sys_id', <sys id of record where signature is added>);
    attach.addEncodedQuery('file_nameLIKEsubmitter-sign');  //'submitter-sign' is static name of signature file atatched to record
    attach.query();
    if (attach.next()) {
        sign_sysid = attach.sys_id;
    }


    requestor.createRequest(targetAttachmentForSign, "table where signature is added as attachment>", <sys id of record where signature is added>, "myPDF.pdf");
    requestor.addSignatureMapping(page, leftMargin, topMargin, signatureWidth, signatureHeight, sign_sysid);
    var results = requestor.processRequest();

AmritaT
Tera Expert

Hi, I wanted to try this out on my personal instance as I have a similar requirement. Can you please let me know how do we download this .xml file ? It asks for login credentials. Thanks!

Hi AmritaT,

just click on "Raw" and then on the next page -> Right click -> Save as

 

https://github.com/platform-experience/serviceportal-widget-library/blob/master/pe-emp-exp-signature-modal-snippet/pe-emp-exp-signature-modal-snippet.u-update-set.xml

Thanks. I was able to download 🙂

Adam Peterson
Kilo Sage

Felix, did you end up implementing this?

Can anyone provide screenshots in how they are using this?

I am wondering if I can use this on certain Service Catalog items that are on the Service Portal.