2

Formula field

I have created a Hyperlink formula field with "_self" as target parameter as shown in the picture. This works correctly in Salesforce classic. But it opens in a new tab, when I use it in lightning experience. Please help me find a solution to this. Thanks!

1

Check your critical updates I know that in winter 19 there was a critical update added to resolve this behavour although it says this has now been automatically enabled:

https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_general_lex_honor_target_value_formula_fields.htm

The formula looks correct to me.

Although I always wrap the target in "_self" not '_self'

  • Thank you issue resolved – ashok Jul 26 at 6:20
0

If you are not ready to enable critical update, You can handle the behaviour in the difference in classic and Lightning as follows:-

IF( $User.UITheme == 'Theme4d', 
HYPERLINK("/url , "link name"), 
HYPERLINK("/url , "link name","_self"))

In classic, You need the _self to open it in the same tab while in lightning don't.

If you have enabled the critical update, then you will experience the same behaviour in Classic and Lightning. You don't need to handle separately for classic and lightning then.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.