Giter VIP home page Giter VIP logo

Comments (2)

iamkalai avatar iamkalai commented on July 3, 2024

Some related notes from Slack

  • /if you have fields you want to exclude from being read only use this
var notReadOnly = ["your_custom_field","other_field_that_is_not_read_only"];
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
            if(notReadOnly.indexOf(fields[x]) == -1){
                g_form.setReadOnly(fields[x], true);
            }
 }

From https://docs.servicenow.com/bundle/newyork-it-service-management/page/product/service-catalog-management/concept/service-catalog-variable-editor.html

  • To make the VEditor read-only in Platform, activate the onLoad client script, "Variable Editor Readonly", for the following tables:

  • To make the VEditor read-only in Service Portal, navigate to Service Portal > Portals, select Service Portal, and specify the following code in the Quick start config field. "readonly_variable_editor": "true"

  • Catalog UI policies, catalog client scripts, catalog data lookups, reference qualifiers, and dependent reference fields are supported on the default variable editor only for task-extended tables. To support a catalog UI policy or a catalog client script on this editor, select the Applies on the Target Record check box for the catalog UI policy or the catalog client script.

  • To make this editor read-only, create an onLoad client script on the task extension and add the following code:

function onLoad() {
 $("variable_map").querySelectorAll("item").forEach(function(item){
 var variable = item.getAttribute("qname");
 g_form.setReadOnly("variables."+ variable, true);
 });
 }

from sntil.

jsteave avatar jsteave commented on July 3, 2024

To explain in layman terms it refers to the current page that is opened in Servicenow .

Example : Apptros

g_form.addInfoMessage(' this is my form');

This method means display the message " this is my form'"

on your current page

from sntil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.