How to prevent duplicate attachments in UI builder when using attachment component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2024 11:56 PM
I have used this attachment component in UI builder. How to prevent user from adding duplicate attachments ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 02:15 AM
Hi @Hm10
When you say duplicate, are you referring to file name or content too?
OOTB there is no way to do this, you need to write code to check the name and validate.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 05:39 AM - edited 02-19-2024 05:40 AM
Thanks for replying. Currently I want to prevent duplicate file name.
Actually I am new to UI builder. I want to know, how to validate this in UI builder and script?
I created a business rule on sys_attachment table to abort duplicate attachment. It is working as expected but there are no errors displaying on the UI builder page for this.
How can we show error messages on abort action business rule to UI builder page ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 10:47 AM
Hi @Hm10
Its very New to me too,
try to check here
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************