Business Rule to Create hyperlink in Work notes

mballinger
Mega Guru

Hello,

I have an onBefore() BR and I need to create a clickable link in the work notes. I have a script, but it is not working. Not sure what I am doing wrong.

This is what I have:

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    current.work_notes =' [code]<a href="https://www.servicenow.com">ServiceNow.com</a>[/code]';

})(current, previous);

Thanks!

1 ACCEPTED SOLUTION

Hi,

Furthermore, please check your system property value for: glide.ui.security.allow_codetag

This should be set to "true". Default, it is true, but perhaps someone could have changed it on your instance.

https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Hello,

Can you please give more information as to how "it is not working"?

What do you mean? What errors are you seeing? What does the work note look like on the record?

If it's not doing anything...then you'd want to check your condition, etc. for the business rule to ensure it will run properly.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

@Allen Andreas - Sorry for not providing full details. It is displaying as text in the work notes. Please see the screen shot

find_real_file.png

Hello,

I'm glad my reply above was Helpful in order to obtain more information.

Please share an example screenshot of your business rule as the outcome you've posted is different than the script you provided.

We don't need a "general script" you're using if that's not really what you're using.

If you don't mind, please share what you literally have?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

Furthermore, please check your system property value for: glide.ui.security.allow_codetag

This should be set to "true". Default, it is true, but perhaps someone could have changed it on your instance.

https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!