e-sign widget on custom table

Christine30
Tera Guru

Hello:

I am new to widgets. I'd like to create catalog tasks for e-signature from a custom task table. I've followed the steps at the helpful link below to create widget which embeds the e-sign widget.

https://community.servicenow.com/community?id=community_question&sys_id=3f44f692db1d7810a4c10b55ca9619d2&anchor=answer_7ed2dc24db317014ddb1d9d9689619c3&view_source=searchResult

My question, which relates to widgets in general, is how to "call" the widget from my custom task table. In other words, when "$sp.getParameter('sys_id')" is executed, where is the sys_id coming from? Must I add code to a server or client script, or UI action on the custom task table to invoke the widget? (I've searched for this on other task tables but can't seem to find it).

The post above mentions that "the widget will expect the sys_id to be a URL parameter named sys_id. i.e. the page will be something like INSTANCEURL/sp?id=PAGEID&sys_id=a02baa76dbe5745029d85425f396194f" but I am not sure exactly what that means. When I am on the custom task form, the widget isn't "called" so the sys_id is not populated in the widget's "$sp.getParameter('sys_id')".

Thank you for any help or pointers.

Christine

 

7 REPLIES 7

Mohith Devatte
Tera Sage
Tera Sage

Hello ,

$sp.getParameter('sys_id') -- > this means it goes to the current url of the page and searches of sys_id is present in the URL.

So URL is considered as a parameter .If you want to access any parameter you can use the above method and mention the parameter name in the braces 

so when you above line and if your URL is this 

INSTANCEURL/sp?id=PAGEID&sys_id=a02baa76dbe5745029d85425f396194f

it catches the sys_id parameter and returns the output as a02baa76dbe5745029d85425f396194f

Hope this helps 

Mark my answer correct if it helps you

I think I want the sys_id to be the page the custom task form is on? As it is the sys_id is always blank because the page is the portal page on which the widget is displayed? Thanks.

can you explain it again sorry got confused 

or may be a screenshot with explanation would help me to debug the issue

Thank you for your help. In the attachment, I've added the highlighted rows to print the value of "sys_id" and "id", then I go to the Portal where I have added the widget and refresh. The sys_id is blank, and the id is the Id of the Portal Page.

Don't I need the Widget to find the sys_id of the custom task form? And if so how do I do that? Thank you again.

 

find_real_file.png