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.

In VTBs find the Private task number on a Card from CheckList > Create task > for onSubmit script

peter_foreman
Tera Guru

In the VTB (Freeform) board select a card

From the Card select Checklist > Create task > select Incident

Is there a way to get from the Dom the value of the Private task number on the Card for an onSubmit script for the Incident

 

1 ACCEPTED SOLUTION

peter_foreman
Tera Guru

I found this gave me the value I needed: at https://[instanceName].service-now.com/nav_to.do?uri=%2F$vtb.do

top.window.frames[0].frames.document.getElementsByClassName("vtb-card-details")[0].getElementsByClassName("modal-title")[0].innerText;
at https://[instanceName].service-now.com/$vtb.do
top.frames.document
.getElementsByClassName("vtb-card-details")[0].getElementsByClassName("modal-title")[0].innerText;
 

View solution in original post

1 REPLY 1

peter_foreman
Tera Guru

I found this gave me the value I needed: at https://[instanceName].service-now.com/nav_to.do?uri=%2F$vtb.do

top.window.frames[0].frames.document.getElementsByClassName("vtb-card-details")[0].getElementsByClassName("modal-title")[0].innerText;
at https://[instanceName].service-now.com/$vtb.do
top.frames.document
.getElementsByClassName("vtb-card-details")[0].getElementsByClassName("modal-title")[0].innerText;