queries on client scripts

vodnalar26
Tera Contributor

Give the Real time scenarios on topic of Client Scripts to practice.

9 REPLIES 9

Srikanth_9
Kilo Sage

Hi @vodnalar26 ,

 

You can find a lot of real-time problem-solving questions in the Community itself.

Refer YouTube videos for more scenarios and practice them in the PDI.

 

If the provided solution is useful/working, please Accept as Solution and hit the Helpful. 
 
Thanks & Regards,
Srikanth Akula.

SohamTipnis
Mega Sage

Hi @vodnalar26,

 

Here some of real scenario's based use cases:

  1. When Incident Form Loaded then some filed are make Mandatory or Read Only or Visible
    /Invisible and add an Information Message to define fill all mandatory fields
  2. When Incident State is On-Hold Then On Hold Reason field should be Visible and
    Mandatory
    2. Add warning message below hold reason field that is ‘’Please select at least one hold
    reason’’
  3. Any customer after submitted (Priority 1-Critcal) incident
    1. We need to display one alert message to customer about Criticality (Are you submitting
    Priority one ticket)
    2. Include Ok and Cancel Buttons also
  4. 1. When Incident state is Resolved Then Resolution Code and Resolution Notes are
    mandatory
    2. Assigned to and Assignment Group should not be seen
  5. If Selected Caller is VIP in Incident table, then Impact and Urgency field values setup
    1-High.Impact-High and Urgency High then Priority 1- Critical set automatically
    2. Impact and Urgency fields should be read only on above condition
    3. Display on alert message on browser that is (Caller is VIP!)
  6. If customer selected Incident Category is Inquiry/Help, then Subcategory
    field should be hide
    2. Remove choice 1-High from Impact and Urgency fields
    3. Display an Error Message below impact field (Low impact is not preferring
    high priority)
  7. 1. When current incident state is New then remove all choices from State field
    Choices need to be removed (In-Progress, On-Hold, Resolved, Closed, Cancelled).
    2. When current incident State is In-Progress or On-Hold then remove all choices from
    State Field Choices need to be removed (New, Closed,).
    3. When current incident State is Resolved, then remove these all choices
    Choices need to be removed (New, In-Progress, On-Hold, Cancelled)
    4. When current incident State is Closed, then state field should be Read-only
  8. If incident state is Closed then all fields make read-only
    1. If incident state is closed, assigned to, assignment group, category, subcategory, impact,
    urgency, contact type, short description, caller field are make read-only
    2. Attachment Icon should not see in Closed record
    3. All Related Lists should be hide
  9. When customer changed incident Priority field value then work notes should
    be mandatory
    1. If record is New or Form isLoading or oldValue == newValue same then work notes
    field should not mandatory
    2. When customer changed Priority 1 to 2 then work notes field make Mandatory
  10. User restriction, not allowing update the cell value from Incident List View
    1. Any customer tries to change incident state value to 7- Closed action will be cancel and
    display alert message to customer
    2. Alert Message (System not allow user to update cell value)
  11. 1. When user submit incident form need to display Assigned to Name as alter message
    2. Give confirmation message also
  12. Auto assign the value to Assignment Group depends on category
    1. If Category is Network auto assigned Network Assignment Group
    2. Category is Hardware auto assigned to Hardware Assignment Group
    3. Category is Database auto assigned to Database Assignment Group
    4. Category is Software auto assigned to Software Assignment Group
  13. Auto set Caller value into caller field depends on current logged in user
    1. Display alert message say Hello message with logged in user full name
  14. Date Validation between two fields for Incident table
    1. Create Two custom fields in incident tables (Start Date, End Date)
    2. Start date shoul should be always before End date
    3. Start date should not equal to End date
    4. Give me Error Message under End date field
  15. Hide Resolution Information section when state is not equal to Resolved
    1. When Page Is Loading and state is not equal to Resolved then hide Resolution
    Information section otherwise display section.

 

Hope this helps you!!!😉

 

If you find my answer useful, please mark it as Helpful and Correct. ‌‌‌‌😊


Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10

Aditya_hublikar
Mega Sage

Hello @vodnalar26 ,

 

Please refer this thread : https://www.servicenow.com/community/servicenow-studio-forum/client-script-realtime-scenarios/m-p/35...

 

If this helps you then accept as solution and mark it as helpful .

Regards,

Aditya

Tanushree Maiti
Tera Patron

Hi @vodnalar26 

 

Check

https://www.youtube.com/watch?v=YT_1-jVUyNE

Mastering Client Scripts in ServiceNow – A Practical YouTube Playlist for Real-World Scenarios

https://www.youtube.com/watch?v=WlBL3TbUYsw

https://www.youtube.com/watch?v=EUyjFxrj-ec

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Welcome back to Mastering ServiceNow Scripting - From Basics to Best Practices! 📌 In this video, we dive deep into Client Scripts in ServiceNow - one of the most essential tools for enhancing the user experience through real-time validation and dynamic form behavior. 🔍 Topics covered: What are ...
servicenow #skfacts #servicenowdeveloper #ServiceNow #ITSM #ITIL #ServiceManagement #ServiceDesk #IncidentManagement #ChangeManagement #CMDB #Automation #DigitalTransformation #ServiceNowAdmin #ServiceNowDevelopment #ServiceNowCommunity #ServiceNowTraining #ServiceNowIntegration students can log ...
If you have basic knowledge in ServiceNow and face difficulties writing script in ServiceNow then this ServiceNow scripting tutorial is for you. In this tutorial i have explained from very basic to advance level of scripting. I have used real word use case to explain the scenarios. After watching

Its_Azar
Mega Sage

Hi there @vodnalar26 

 

I would suggest using AI to get requirements, it's not that big of a deal to ask here buddy. Happy learning

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.