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.

GlideDialogForm objt is not working

APV Babu 06-11
Tera Contributor

Hello,

 

 

I have an requirement need to open a glide window on click ui action actually below code is working before one week now it's not working need a help..

 

 

function onRequest() {
    //Get the table name and sys_id of the record.
    var plan = g_form.getValue('plan_s');
    var lead = g_form.getValue('lead_cons');
    var request = g_form.getValue('request_action');
    var info = g_form.getUniqueValue();
    //var tableName = "x_trer2_rps_tech_erit_task.do?sys_id=-1&sysparm_query=" + '^parent_intake=' + info;
    var tableName = "x_trer2_rps_tech_erit_task.do?sys_id=-1&sysparm_view=adjustment_task&sysparm_view_forced=true&sysparm_query=" + '^request_action=' + request + '^plan_s=' + plan + '^parent_intake=' + info + '^lead_consultant=' + lead + '^';
    //var sysID = -1;

    //Create and open the dialog form
    var dialog = new GlideDialogForm('Create Adjustment Task', tableName); //Provide dialog title and table name
    dialog.setSysID("-1"); //Pass in sys_id to edit existing record, -1 to create new record
    dialog.addParm('sysparm_view', 'adjustment_task'); //Specify a form view
    dialog.setLoadCallback(function(iframeDoc) {
        // To get the iframe: document.defaultView in non-IE, document.parentWindow in IE
        var dialogFrame = 'adjustment_task' in iframeDoc ? iframeDoc.adjustment_task : iframeDoc.parentWindow;
        //dialogFrame.g_form.setValue('parent_intake', info);
        //dialogFrame = '';

    });
    dialog.render(); //Open the dialog

}
 
 
Thanks in advance!!
 
APV Babu
6 REPLIES 6

@APV Babu 06-11 

is it going inside that callback method?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Runjay Patel
Giga Sage

Hi @APV Babu 06-11 ,

 

Have you applied any view rule? check that one.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------