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.

Issue with dropdown texts in g_modal.showFields in Zurich version

pratik1sada
Tera Contributor

I have a client-side UI Action script that converts the sys_class_name of a record when a user clicks the button. The modal displays a dropdown with three tables. When a user selects a table and clicks the "Convert Case" button, the sys_class_name of the current record updates correctly.

This was working fine in Yokohama. However, after migrating to Zurich last week, the dropdown text now appears white on a white background, making it unreadable. I have tried several CSS approaches targeting g_modal.showFields, but nothing resolves the issue.

I’m sharing the UI Action client script and a snippet of the dropdown showing the white background.

Has anyone encountered this issue in Zurich, or can suggest a solution to fix the dropdown text visibility?
Below is my script

function onClick(g_form) {
    // Simple modal with one dropdown in Workspace (Zurich+)
    g_modal.showFields({
        title: "Select Case Type",
        size: "md",
        confirmTitle: "Convert Case", // <-- sets the primary button text
        fields: [
            {
                type: "choice",           // this creates a dropdown
                name: "case_type",
                label: "Case type",
                mandatory: true,
                // choices for the dropdown
                choices: [
                    { label: "table 1", value: "sn_table1" },
                    { label: "table 2", value: "sn_table2" },
                    { label: "table 3", value: "sn_table3" }
                ]
            }
        ]
    }).then(function (result) {
        // result.updatedFields is an array of the fields in the modal
        if (!result || !result.updatedFields || !result.updatedFields.length) {
            return;
        }

        var caseTypeValue = result.updatedFields[0].value;

        if (caseTypeValue) {
            // set field on the current record
            g_form.setValue("sys_class_name", caseTypeValue);

            // save and close workspace tab
            g_form.save().then(function () {
                if (typeof g_aw !== "undefined" && g_aw.closeRecord) {
                    g_aw.closeRecord();
                }
            });
        }
    });
}
0 REPLIES 0