Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!