How to create a Dialog box window in Service catalog

shaik_irfan
Tera Guru

Hello Experts,

I have a requirement where if the Candidate field is set as Choice which consist of New & Existing, whenever the user selects candidate choice field as New, then a New Customer Pop up Window must be available with the following fields:

*   Name

*   Street 1

*   City

*   State/Province

*   Phone Num

I know how to create dialog box window on a form but dont know how to implement it using variables

1 ACCEPTED SOLUTION

oharel
Kilo Sage

Hi Shaik,



What will you do with the information? will it be stored anywhere? maybe connected to another record?


My idea would be to use the information to update an existing record or to create a new record on some table. If the second case, you can create a view on that table that consists of your desired fields, call that view using GlideDialogForm and once submitted, create a new record with the information.


So you would need something like this:


if(newValue == 'new') { //or the value of new


var dialog = new GlideDialogForm('Please fill in the information', 'TABLE_NAME'); //title, table name


  dialog.addParm('sysparm_view', 'default'); //Specify a form view


  dialog.addParm('sysparm_form_only', 'true'); // Do not show related lists


  dialog.render();


}


harel


View solution in original post

6 REPLIES 6

Jim Coyne
Kilo Patron

Why do you need a popup window/dialog?   Why not just show/hide the fields based on the value of "Candidate" using a UI Policy?


Jim,



The requirement is something like this, On the Record producer when user selects New choice then the Dialog box must popup and the entered data should be autopopulated into the Incident table which creates a record and later using incident # user will entering the data as an Existing user