How to hinder Work Note duplicates when creating clickable URL:s

ronro2
Tera Contributor

Hello guys!

I have a Business Rule which transforms URLs in Work Notes into clickable ones (as opposed to plain text). The business rule runs "Before" "update" and is based on the Task table. See printscreen below: 

ronro2_0-1738762543756.png

 



However, the problem is that the Business Rule causes two work notes, ine URL of plain text format and one clickable link. So it becomes double as you can see in the print screen under: 

ronro2_0-1738760625270.png


Is there any solution to this? 

2 ACCEPTED SOLUTIONS

Mark Manders
Mega Patron

How do you trigger your business rule? Do you trigger it on the sys_journal_field table or on the task table? The problem is that the text is coming from the record and writing to the sys_journal_field table so I think it is simply creating two records. Can you share your rule?

Next to that:

Since it is also against ServiceNow's best practice (from security point of view), I think you should be careful with this. Anyone can just type in anything and when it is clickable, it is very easy to click on a malicious link. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@ronro2 

I believe you should be careful before actually delivering to prod since any text will be made clickable via your business rule unless you have proper condition on which text will become clickable.

You should have business rule on sys_journal_field with proper condition and then convert it into clickable link

If your business rule is on your table then it will cause 2 links because work notes are stored in Journal table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Mark Manders
Mega Patron

How do you trigger your business rule? Do you trigger it on the sys_journal_field table or on the task table? The problem is that the text is coming from the record and writing to the sys_journal_field table so I think it is simply creating two records. Can you share your rule?

Next to that:

Since it is also against ServiceNow's best practice (from security point of view), I think you should be careful with this. Anyone can just type in anything and when it is clickable, it is very easy to click on a malicious link. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

I've updated the topic, it is based on the task table. 

Since our users are gonna be admins mostly and other trusted people, they'll be careful with links. 

Ankur Bawiskar
Tera Patron
Tera Patron

@ronro2 

I believe you should be careful before actually delivering to prod since any text will be made clickable via your business rule unless you have proper condition on which text will become clickable.

You should have business rule on sys_journal_field with proper condition and then convert it into clickable link

If your business rule is on your table then it will cause 2 links because work notes are stored in Journal table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader