You need to sign in to do that
Don't have an account?
ArchieTechie6
Javascript in formula field
Hello All,
I want to know how to write Javascript in formula field.
Something similar to this blog: https://sfdc-gyaan.rhcloud.com/2014/04/referencing-javascript-file-from-static-resources-in-formula-fields/
I have a formula field. When clicked on it, I want to perform an action using JS.
I want to know how to write Javascript in formula field.
Something similar to this blog: https://sfdc-gyaan.rhcloud.com/2014/04/referencing-javascript-file-from-static-resources-in-formula-fields/
I have a formula field. When clicked on it, I want to perform an action using JS.
HYPERLINK("javascript:alert('Hello World! - Formula Field');var html_doc = document.getElementsByTagName('head')[0];var js = document.createElement('script');js.setAttribute('type','text/javascript');js.setAttribute('src','/resource/********/HelloJS');html_doc.appendChild(js);js.onload= function() { sayHelloFromAnotherJS(); }; ","_self")
And then, I get this error:
Error: Incorrect argument value for function 'HYPERLINK()'. Javascript is not allowed.
And then, I get this error:
Error: Incorrect argument value for function 'HYPERLINK()'. Javascript is not allowed.
Can anyone help me here?
https://help.salesforce.com/articleView?id=000249336&type=1
Please check below link for a workaround:
http://www.shelovestocode.com/2017/05/javascript-in-salesforce-formula-custom.html
Mark it as Best Answer, if it helps
All Answers
https://help.salesforce.com/articleView?id=000249336&type=1
Please check below link for a workaround:
http://www.shelovestocode.com/2017/05/javascript-in-salesforce-formula-custom.html
Mark it as Best Answer, if it helps
This helps as I am really new to salesforce.