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

110
Vistas
I am trying to pass values from HTML input into a JavaScript function and then to an apex controller to create a lead in salesforce
  • HTML (here is where I am collecting the information on an experience builder page)

             <div class="slds-form-element__control ">
            <input type="text"
             id="firstName"
             placeholder="First Name"
             class="first_name_input slds-input"
              />                 
             </div>
    
             <div class="slds-form-element__control ">
             <input type="text"
              id="lastName"
              placeholder="Last Name"
              class="last_name_input slds-input"
              />     
    
             </div>
    
             <div class="slds-form-element__control ">
             <input type="text"
              id="email"
              placeholder="Email Address"
              class="email_input slds-input"
              />                 
             </div>
    

-JavaScript (the values are passed to java script where there are multiple functions, this is the function that is designed to pass the values to apex for lead creation)

createLead(firstName,lastName, email) {
            var firstName = firstName
            var lastName = lastName
            var email = email
            this.createOrObtainExistingLead()
            this.navigateToFAPage()
            }

-Apex(once values are passed to the apex controller the lead should be created with values passed from JavaScript)

public class VOQuickQuoteController {

@AuraEnabled
@future
public static void createOrObtainExistingLead(string firstName, string lastName, string email,) {    
    
    Lead l = new Lead(
        firstName=firstName,
        lastName=lastName,
        email=email,       
    );
    insert l;    
}    

}

about 4 years ago · Juan Pablo Isaza
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