Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

259
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda