4

I want to display my custom field on lightning UI. I have dragged the custom field on the layout. I can see the custom field on Classic UI but not in lightning UI. See Below snapshots from classic and lightning: I am not sure if I am looking at the correct place on lightning. I have seen the "Salesforce1 Actions" in page layout to see link is there but it is not there. How can I display the link on lightning?

EDITED: Forgot to mention - The link is from managed package

enter image description here

3
  • Is that Custom Link having any Javascript Coding In it? – Subhash Jun 3 '16 at 11:24
  • Yes! there is a backend javascript. – Mehul Jun 3 '16 at 11:41
  • Not sure about the links but javascript button are not supported in lightning.so I think Links are also not supported. last when I check they are not supported. – Tushar Sharma Jun 3 '16 at 12:42
1

According to Present Version of Lightning Experience, It cannot work on the Javascript Functionalities directly from the Buttons or Links. It will show nothing on Lightning Page if the Button or Link is the Type of "Onclick Javascript"

But if you really want to do the Javascript Functionalities with the Buttons, There is one weird use to get the process done. I am not saying that this is the only way workout for your scenario. But I can say that this is the 100% workout way.

If you can, Follow the below Steps.

1) Create a VF Page by putting the Standard Controller as the Object that you are using like StandardController=Quote and do your Coding of the Javascript and Everything within that VF Page. And that VF Page should show only the Button or Link by means of <apex:pageBlockButton> or HTML Buttons... And refer that Button to the Javascript within that VF Page.

2) Remove all the unnecessary things like header, sidebar, etc... from the VF Page by using the Attributes of <apex:page>. i.e. If you open the VF Page, It must show only the Button or Link in the page.

3) Now Goto the Object Level and Click on "Edit Layout". Click on "Visualforce Pages" and drag your page to that detail page.

4) Change the Properties of the VF Page Section accordingly (Say Height=50% and Width=100% or 50%)

5) Save the Page Layout. Now check the Button or Link both in Classic and Lightning. It will work perfectly.

Hope this helps...

5
  • Saurabh, Thanks for the information and they all make sense. I forgot to mention that the link, classes and pages are from managed package. So, I will have to update those in package and need to re-install. – Mehul Jun 3 '16 at 13:04
  • Hi Mehul, but for the managed package things you cannot put it directly... updating the package and reinstalling will differ for other scenarios right? If you know what is happening in that managed package button, you can create one vfp and you can do the process that what I have mention to use in the lightning. As far as I know, you cannot use the javascripts in lightning – Subhash Jun 4 '16 at 6:22
  • Hi Subhash, I am handling the package. As javascripts are not supported, I will have to follow your steps and make changes accordingly to the package. This is not so heavy change but this should be supported in lightning too at least in the web browser. – Mehul Jun 6 '16 at 7:23
  • Changing from the Package Level is your wish... But follow the Steps given and make sure it is working perfectly. If you made any mistake or left something, You have to change the Packaged Content again And The way that i have given will work in the Lightning for sure... All the Best. – Subhash Jun 6 '16 at 7:27
  • Thanks Subhash!! I am going to follow the steps you provided. – Mehul Jun 7 '16 at 9:34
0

The custom links show up in the 'Detail' section for your objects in Lightning Experience. For example, see the provided screenshot below

enter image description here

This is mentioned in the corresponding Trailhead module as well.

Also note the behaviour of custom links is changing, there's a related idea to this which is a part of the Summer 16 release

3
  • Yes, I am looking into Detail section but it isn't there. Not sure what is wrong. – Mehul Jun 3 '16 at 12:08
  • Can you double check by switching to classic view to verify if it shows there? – Gaurav Kheterpal Jun 3 '16 at 12:14
  • Gaurav, it is there in classic UI. – Mehul Jun 3 '16 at 12:16

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.