The CreatorCon Call for Content is officially open! Get started here.

How To Create Url that Triggers a Ui page ??

Tarun2
Tera Contributor

Hi ,

 

I have a requirement to Trigger UI Page using a Button . Onclick() i am trying to open a Ui page.

* Button Created using Ui Actions in a Table's Form 

* Both Ui page and Ui action are in the Same scope .

                              I have Tried these ways :

1.g_navigation.openPopup() for ui page

2,window.open('/<UipageNAME >.do?sysparm_id='+g_form.getUniqueValue());

3.Dialog

var dialog = new GlideDialogWindow("UipageNAME");
dialog.setTitle("UI Page Opened");
dialog.setPreference("sysparm_id", g_form.getUniqueValue());
dialog.render(); 

                         Nothing Worked For me . Maybe , I had issue in Creating url for ui Page .

  

Check My Previous Thread : https://community.servicenow.com/community?id=community_question&sys_id=a0fb1736db13c0502be0a851ca96...

 

 

 

 

 

But , i had a Hard Time Creating URL for Ui page .Its not Working 

Help me Creating url for a Ui Page in Right way . My UI Page : TraceDemo 

Please ,Help me in Triggering Ui page Using Ui Actions Button.

Any Suggestion is Appreciated .

 

Thankyou,

1 ACCEPTED SOLUTION

i tested with other d3.js library and showing me the content, so please validate with your script which you are using on your UI Page. 

 

https://d3js.org/d3.v4.js

 

find_real_file.png

 

If my answer helped you, kindly mark it as correct and helpful.

 

View solution in original post

14 REPLIES 14

i think the code which you had pasted thats  not complete code, where is js library, i am not sure what exactly your code is doing but seems like you are calling external js  ,

 

if you see the html part below you have nothing

 

<!-- load the d3.js library -->
<script></script>

<script></script>

so now i think you have question around why content is not appearing, so if i am not wrong ui page visibility on onClick is working ?

 

best way to troubleshoot , go to ui page and click on "try it" button to see the output of your ui page. this way you can be sure if content is showing or not. now you have no issue with the "ui action", it will show the ui page content based on configuration/scripting done . 

 

If my answer helped you, kindly mark it as correct and helpful.

External js is Present inthe html ,

Dont know why its not copied .

Here,it is :

<!-- load the d3.js library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>


Ui page is working fine . when Clicked on  Try Button.

But , Nothing shows in Dailogbox.

Can u try adding this <script> and Tell me , whats wrong.

 

i tested with other d3.js library and showing me the content, so please validate with your script which you are using on your UI Page. 

 

https://d3js.org/d3.v4.js

 

find_real_file.png

 

If my answer helped you, kindly mark it as correct and helpful.

 

Harsh Vardhan
Giga Patron

any update on this thread ?

If my answer helped you, kindly mark it as correct and helpful.