hi
- User
hi
- Assistant
Hello! How can I assist you today?
- User
i need to write client script for servicenow
- Assistant
Sure, I can help you with that. What specific functionality are you trying to achieve in the ServiceNow client script?
- User
onload..i want to make short description field mandatory andalso i want discription field read only
- Assistant
To make the short description field mandatory and the description field read-only on form load in ServiceNow, you can achieve this by writing a client script. Here is an example of how you can achieve this using a UI Policy and a Client Script in ServiceNow:
-
Go to System Definition -> UI Policies in ServiceNow.
-
Create a new UI Policy with the following settings:
- Table: Incident (or the table where your fields are located)
- Type: Mandatory
- Set conditions to display this UI Policy as needed
- Configure the conditions to check for the short description field
-
Save the UI Policy.
-
Go to System UI -> Client scripts.
-
Create a new client script with the following settings:
- Table: Incident (or the table where your fields are located)
- Type: onLoad
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.