Need Answers for the below

Snow preck
Tera Contributor

precilaK_1-1718549079940.pngprecilaK_2-1718549108293.png

precilaK_3-1718549657330.png

 

 

5 REPLIES 5

Deepak Shaerma
Kilo Sage

Hi @Snow preck 

UI policy has UI policy actions and also script when condition evaluates to true/false

 

so this is the order; try once

 

1) UI policy action first

 

2) UI policy script

 

Ques 2 : current and email is the correct answer

 

Ques 3: again B is the right answer to show field info msg to specific field. 

 

please mark this Helpful and Accepted Solution if this helps you. Your action will help me and the community in understanding same requirements.

 

Thanks & Regards

 

Deepak Sharma

SK Chand Basha
Giga Sage

Hi @Snow preck 

 

1.

Execution order:

1. UI policy script

2. UI policy action

UI Policy scripts use the client-side API to execute script logic based on whether the UI Policy condition tests true or false. Use UI Policy scripts to create complex conditional checks or to take actions other than setting field attributes (mandatory, read-only, or visible).

The scripting fields for UI Policies are only visible in the Advanced view. To enable the scripting fields, select the Run scripts option.

  • The Execute if true script executes when the UI Policy condition tests true.
  • The Execute if false script executes when the UI Policy condition tests false.

2. B 

3. B 

 

Mark it Helpful and Accept Solution!! If this helps you to answer your question

 

Sandeep Rajput
Tera Patron
Tera Patron

@Snow preck Here are the answers.

 

Question1: Which one of the following is true

Answer: A. A UI Policy's Action execute before the UI Policy's script 

Reference: https://www.servicenow.com/community/developer-forum/which-executes-first-ui-policy-action-or-ui-pol...

 

Question2: Which objects can be used in Inbound Action scripts?

Answer:  current and email

 

Question 3: When writing a Client Script to provide feedback targeted at a specific field, which method should be used.

Answer: g_form.showFieldMsg();

Yashsvi
Kilo Sage

Hi @Snow preck

1 Question Answer - (A) A UI Policy's Action execute before the UI Policy's script. 

2 Question Answer - (B) current and email

3 Question Answer - (B) g_form.showFieldMsg();

 

Thank you, please make helpful if you accept the solution.