Is it possible to embed javascript in Hyperlink formula field to open a vf page in a pop up?Can you share the formula,if possible?
1 Answer
Here is an example.
Use of formula field to open a visualforce page in Console and standard view page in Standard or Custom App. [applicable to Classic]
HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcSelf('/apex/VisualforcePage?id=" & Id & "');} "+
" else {window.location.href='/" & Id & "'}"
,Name
, "_Parent"
)
You can refer my blog post: Different ways of navigation
-
Hi Santanu, I am trying to create formual field with the above code it is not letting me save by saving Incorrect argument value for function 'HYPERLINK()'. Javascript is not allowed. (Related field: Formula). Can you help me with my question? link Commented Mar 4, 2019 at 13:58