function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ben Kingsley 8Ben Kingsley 8 

Having an issue with a Javascript formula field

I am getting a security warning message telling me "Javascript is a security vunerability, so it's not allowed in this hyperlink.  Ask your admin for help."  I'm pretty sure Javascript has been retired in SF with the Winter Release. Does anyone know how to rewrite this formula to not inlcude Javascript.  Thanks in advance

HYPERLINK("javascript:if(typeof(srcUp)=='function'){srcUp('/apex/Verify_Page?Id="&Id&"');}else {window.location.href='/apex/Verify_Page?Id="&Id&"'}", 
Name,"_top")
Dev_AryaDev_Arya
Hi Ben,

the use of Javascript is prevented. This link provides more insight to the respective error.
https://help.salesforce.com/articleView?id=000249336&type=1

and you should try alternate solutions like custom button or link, which support javascript execution.
https://help.salesforce.com/articleView?id=defining_custom_links.htm&type=0

Feel free to ask if you have any doubts. Also please mark the solution green if it solves your problem.

Cheers, Dev