Comments (2)
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);
}
}
-
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.
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)
- Get display value of MRVS
- Access variable Info in widget
- GlideStringList acts like array
- Run commands via mid server
- Copy field data to another field
- Check if object is OOB and which plugin it belongs. HOT 1
- Format datetime to human readable texts
- ArrayObjectUtil
- Find if a CI is stale
- Generate strong passwords
- Get host from URL
- Check if 'Customer Updates' exists
- Find host in CMDB using IP address
- Translate an encoded query into user text
- ServiceNow semaphores
- Batch API
- Restrict platform UI for users
- Limit concurrent sessions
- loader.tables.processed
- Get watermark from email
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sntil.