- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2025 10:36 PM
Hey hi,
folks can u all help me with the question...
This will be very helpful for me in the interviews...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 10:18 PM
hi @AryanJ471894898 ,
please refer this link.
If this information proves useful, kindly mark it as helpful or accepted solution.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 10:26 PM
Hi Aryan,
There are a lot but you can use these 5
1. Variable names should be clear and specific so that you have better understanding while writing code
2. While creating a after BR, don't use current.update() as it will create a recurssive action
3. Don't need to use current.update() in before BR as it will automatically save the record. If you use current.update() it will save your record twice
4. Try to use Script include as much as possible for better usability of the code
5. Use system properties instead of hardcoding sysid or any value
If this is helpful for you, please mark it as accepted solution.
Thanks,
Yashraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 10:18 PM
hi @AryanJ471894898 ,
please refer this link.
If this information proves useful, kindly mark it as helpful or accepted solution.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 10:26 PM
You should be able to find answer to your question easily in google or in blogs
ServiceNow Server-Side Scripting Best Practices
ServiceNow Development Best Practices
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 10:26 PM
Hi Aryan,
There are a lot but you can use these 5
1. Variable names should be clear and specific so that you have better understanding while writing code
2. While creating a after BR, don't use current.update() as it will create a recurssive action
3. Don't need to use current.update() in before BR as it will automatically save the record. If you use current.update() it will save your record twice
4. Try to use Script include as much as possible for better usability of the code
5. Use system properties instead of hardcoding sysid or any value
If this is helpful for you, please mark it as accepted solution.
Thanks,
Yashraj