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

136
Visualizações
Get Name of SubGrid on Account Form that Triggers Javascript on the Contact Quick Create Form OnLoad

There is a subgrid on a account form that allows you to quick create a contact (contact quick create form). OnLoad of the quick create form, I need to be able to identify what subgrid triggered the quick create form as there are many on the form.

I currently have the javascript as follows that triggers on the contact quick create form onLoad:

function contactQuickCreateFormOnLoad(context)
{
debugger;

//alert("hello world");

var formContext = context.getFormContext();

var control = formContext.getControl();

}

Am I approaching this correctly as I need to get perhaps the name of the subgrid that triggered the quick create form to load? Is this the correct scope?

I ask this because the above code seems to only allow me to see the actual controls on the quick create form. I can't locate any metadata pertaining to the subgrid that triggered this.

Any suggests would be great.

Regards.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

  • As far as I know, you do not get property from which subgrid your quick create form is opened, yes you do get from which parent entity your quick create is opened.

  • What you could do is customize the button, Add a Js to open your quick create from and there in you can pass parameter.

  • These parameter values you can you can catch/get in your on load of quick create from

    var entityFormOptions = {};
     entityFormOptions["entityName"] = "contact";
     entityFormOptions["useQuickCreateForm"] = true;
    
     // Set default values for the Contact form
     var formParameters = {};
     formParameters["firstname"] = "Sample";
     formParameters["lastname"] = "Contact";
     formParameters["fullname"] = "Sample Contact";
     formParameters["emailaddress1"] = "contact@adventure-works.com";
     formParameters["jobtitle"] = "Sr. Marketing Manager";
     formParameters["donotemail"] = "1";
     formParameters["description"] = "Default values for this record were set programmatically.";
    
     // Set lookup column
     formParameters["preferredsystemuserid"] = "3493e403-fc0c-eb11-a813-002248e258e0"; // ID of the user.
     formParameters["preferredsystemuseridname"] = " Admin user"; // Name of the user.
     formParameters["preferredsystemuseridtype"] = "systemuser"; // Table name.
     // End of set lookup column
    
     // Open the form.
     Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
         function (success) {
             console.log(success);
         },
         function (error) {
             console.log(error);
         });
    
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