-
Notifications
You must be signed in to change notification settings - Fork 909
Smart Field Validation and Dependent Field Derivation Using getError() and setError() #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Field Validation and Dependent Field Derivation Using getError() and setError() #2041
Conversation
If you need HTML beautified alert box, use this.
UI Page to render the custom alert
These are example ScreenShots for reference
Example Screenshots
…Info.png to Catalog Client Script/CustomAlert/Screenshots/ExampleScreenShotCustomAlertInfo.png
…ertSuccess.png to Catalog Client Script/CustomAlert/Screenshots/ExampleScreenShotForCustomAlertSuccess.png
…rtDanger.png to Catalog Client Script/CustomAlert/Screenshots/ExampleScrenShotForCustomAlertDanger.png
Notes for installation or Implementation
Business rule to add work notes on record if notes for tag entries are allowed. It is very hard to track who added the tag to the record and when, this will help to manage to understand who has added what tags on record.
Business rule to add work notes on record if notes for tag removal are allowed. It is very hard to track who removed the tag to the record and when, this will help to manage to understand who has removed what tags on record.
Notes for the implementation
This reverts commit a56fd1f.
This reverts commit deb75b1.
This reverts commit 064f919.
…tion Using getError() and setError() directory
|
Thanks for your contribution, while I am reviewing your PR #2041, appriciate your patience and recommend to check other 2 cool projects 'Hack4Good' and 'Actionpack' Happy Hacking |
|
Hey @mandeepkaran SeemsIt appears that this contribution is a duplicate of your other contribution PR #2036 Please ensure to make unique and meaningful contributions, and refrain from spamming or duplicating submissions. Closing this as it's duplicate. Keep contributing and check other repos as well for quality contribution. Appriciate your time, effort and intent to open-source contribution. Thank you for your contribution. Happy Hacking |
|
@bird-03 Here is the comment from #2036 please DO NOT create a new folder. use already existing - relevant folders to submit your code snippet. Is there a way to reopen this? or I need to submit again? |
|
Thanks for highlighting this, Let me check and get back.
Meanwhile keep contributing with your awesome ideas.😊
*Abhishek Pandey*
*+91 7869881249 || ***@***.*** ***@***.***>*
…On Sat, Oct 11, 2025 at 10:52 PM Mandeep Karan ***@***.***> wrote:
*mandeepkaran* left a comment (ServiceNowDevProgram/code-snippets#2041)
<#2041 (comment)>
@bird-03 <https://github.com/bird-03>
#2036 <#2036>
this was rejected because folder got created for GlideElement so submitted
new one using existing folder.
Here is the comment from #2036
<#2036>
I have reverted this PR as you have created a new main folder -
"GlideElement". There is already GlideElement Folder under Core ServiceNow
APIs folder.
please DO NOT create a new folder. use already existing - relevant folders
to submit your code snippet.
—
Reply to this email directly, view it on GitHub
<#2041 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV5L6JL6QDNRTDNKOPNQ6O33XE4FRAVCNFSM6AAAAACI5PYTOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJTGUZDGOBWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Accepted!! Keep doing cool contributions! |
PR Description:
Smart Field Validation and Dependent Field Derivation Using GlideElement.getError()
This contribution demonstrates how to pass validation context and error messages between multiple Business Rules using the
GlideElement.setError()andGlideElement.getError()methods.The idea helps developers avoid redundant validation logic across Business Rules while enabling context-aware field derivation.
Example Overview
In this example:
First Business Rule (Order 100):
short_descriptionfield.Second Business Rule (Order 200):
getError().Benefits
This approach streamlines the validation process and enhances the maintainability of your ServiceNow applications.
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions