Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

243
Vistas
Salesforce custom button should show in lightning not classic

I am trying to add a link to redirect from opportunity page to a vfp page. There are two pages one for classic and one for lightning. I want to add two links. If user is in classic mode one button will show and for lightning the other button will show. Is it possible with javascript or apex?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I would suggest using a Detail page button to redirect on your page. After creating your button you can edit the page layout and add your newly created button to both lightning and classic page layout enter image description here I think that for your use case 2 buttons are needed, one to redirect in lightning and one to redirect in classic.

Otherwise, if you want to have a conditional link with Javascript you can try something like(I have never tested this though, so I'm not sure it's working):

if( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) {
     // Do something for Lightning Experience
} else {
    // Use classic Visualforce
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda