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

252
Vistas
Dynamics 365 CRM Getting a two optionset value (yes or no) and using it to disable all form fields in Javascript

in Dynamics 365 CRM form there's a checkbox field named opu_paid, if its unchecked, im supposed to disable all fields in the form in javascript. so far im stuck in my code on how to get the value from this checkbox field (wether its true or false) so i can use "setDisabled" method

How do i get the the checkbox field value ?

var formContext = Context.getFormContext();
var paidCheckbox = formContext.getAttribute("opu_paid").getValue() // this is not working 

if(!paidCheckbox)
{
    formContext.getControl("firstname").setDisabled(true);
    formContext.getControl("lastname").setDisabled(true);
}
else
{
    formContext.getControl("firstname").setDisabled(false);
    formContext.getControl("lastname").setDisabled(false);
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Pretty sure your attribute name is wrong. Attributes will either be OOB attributes or are required to have a prefix of "something_" to it.

What you have is correct otherwise. If you need more help, you'll need to provide better details like what is getValue() returning? How is it not working?

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