简体   繁体   中英

How to set a default form from sub-grid

I've created a sub-grid in Contacts Entity to show related lead records for the contact. Due to the client requirement, We also have the functionality to create a new lead from contact entity through this sub-grid. Everything is fine till here. We have two lead forms created by each product line. Say Home Furniture Lead form and Office Furniture Lead form. I'm looking for an ability to set the Home furniture lead form as a default form to open from the sub-grid in contacts entity.

When the user clicks Add new lead from the sub-grid in contacts form, it should by default open Home Furniture form. If someone can suggest a way or a code to accomplish this, that would be great.

If you look at the description for extraqs on this page you can specify the form id to open the form with. So you have two options:

  1. Use javascript to edit the url within the subgrid. Not sure if this is possible, but it should be.
  2. Call the OpenEntityForm javascript in the onload of the lead form, after determining the correct product line, passing in the correct form id.

If you get option 1 to work, let us know!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM