- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 01:16 AM
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,
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 01:36 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 05:11 PM
Hi Shreya,
First I loaded PE Signature Pad loaded from https://github.com/platform-experience/serviceportal-widget-library/blob/master/pe-emp-exp-signature...
- After committing the update set, we made the below changes:
- Stored the signature value in a hidden variable by converting that into base64. For this, we made changes to the Widget Client script. The updated client script is:
function ScratchPadController($scope) {
var c = this;
c.showval = false;
c.done = function() {
var signature = c.accept();
c.showval = true;
if (signature.isEmpty) {
// console.log('scratch pad empty');
} else {
// console.log(signature.dataUrl);
var str = signature.dataUrl;
var newInput = {
value: signature.dataUrl
}
var finalstr = str.replace(/^data:image\/(png|jpg);base64,/, "");
$scope.page.g_form.setValue('base64value', finalstr);
//c.server.get(newInput);
}
}
c.clearVal = function() {
$scope.page.g_form.setValue('base64value', '');
c.showval = false;
var signature = c.clear();
}
}
- Another changes was to attach the converted signature to the target record. For that, we added ‘Post insert script’ on record producer, see below script to attach the sign as an attachment to Case(target record)
var content =producer.base64value; //base64value is my Multi line text variable name
var fileName = 'submitter-sign.png'; //name given to attachment at target record
var contentType = 'image/png';
var tableName = 'sn_customerservice_case';
var tableSysId = current.sys_id;
var eccGr = new GlideRecord('ecc_queue');
eccGr.initialize();
eccGr.setValue('agent', 'AttachmentCreator');
eccGr.setValue('topic', 'AttachmentCreator');
eccGr.setValue('name', fileName+':'+contentType);
eccGr.setValue('source', tableName+':'+tableSysId);
eccGr.setValue('payload', content);
var sys_id = eccGr.insert();
- Stored the signature value in a hidden variable by converting that into base64. For this, we made changes to the Widget Client script. The updated client script is:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 03:59 AM
Hi Sachin,
Thankyou so much, but still only 2 buttons are visible.. signature pad is not visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 05:57 PM
Hi,
Can you please confirm if you committed the update set named "PE Emp Exp Signature Modal Header " from the link above. This update set contains all the required angular providers and scripts required for sign pad to appear. I tried in my PDI and this is what the update set looks like after committing.
And, after that, I created a test RP with a variable type 'Custom' and added the widget. This is what I can see.
If you are unable to see the scratchpad after following above steps then , can you post all the steps you followed to make this work and I cna review.
Thanks,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 03:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 09:10 PM - edited 09-04-2024 05:47 AM
I’ve successfully implemented the feature to attach the signature to the case and store it in an image-type field in the table. However, I’m encountering an issue when trying to add this image field to the document—the signature isn’t appearing in the generated document. Could you please share how you managed to get it added to the document?
Edit:
got the solution and I am able to use the generated image as signature for document now.