web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Creating a custom entity and adding a sub-grid to Leads form to enter deatails

(0) ShareShare
ReportReport
Posted on by

Hi all, I'm re-submitted below question with a slight change in scenario.

We require to add a new sub-grid to leads form with following fields.

- Designation (lookup field)

- Response field (Text field)

I've managed to customize up to a certain level but it's not completely solved yet.

- I created a new entity along with required fields. Then created relationship between two entities.

7041.Capture3.PNG

4745.Capture4.PNG

- Then, I've added a sub-grid to main form of lead and assigned Active lead responses view

Note - It doesn't allow display new entity under 'Only related records'. Therefore had to select 'All record types' and pick the view

57148.Capture5.PNG

1513.Capture6.PNG

- After publishing all customization and when I attempt to add a lead response, it doesn't display any controller (text box/drop-down list) to enter data.

8664.Capture7.PNG

If someone can guide me to figure out this confusion, that'd be really appreciated.

*This post is locked for comments

I have the same question (0)
  • Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    Regarding this: when I attempt to add a lead response, it doesn't display any controller (text box/drop-down list) to enter data.

    You click the + button on the sub grid to add a new lead response right? Did you add new fields created on forms for Lead Response?

    Regards,

    Abby

  • Suggested answer
    Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    Regarding this: Note - It doesn't allow display new entity under 'Only related records'. Therefore had to select 'All record types' and pick the view

    Seems you don't have a relationship between Lead and Lead Response, for this reason you don't have the option 'Only related records'.

    If your relationship is 1 lead - N lead response, you should create a Lead field as a lookup field in Entity Lead Response.

    Regards,

    Abby

  • Community Member Profile Picture
    on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Yes, I tried by pressing ' + ' button but it doesn't pop-up any controller to add data.

    And yes, I've add fields of new entity to a view in lead response entity. And then mapped that view to the sub-grid in lead for as shown in screenshots

  • Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    Does an empty form pop up?

    Can you please go Entities->Lead Response->Forms, double click on the form with Form Type = 'Main', and see if the field are added on the Form?

    leadresponseform.png

    Regards,

    Abby

  • Community Member Profile Picture
    on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Abby,

    Yes, I've added relationship as below (it was there even when I posted the question)

    6215.2.PNG

    6215.2.PNG

  • Community Member Profile Picture
    on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi, Thanks for the feedback. I just added "Designation" field to main form. Then when I press add button on on the sub-grid, it does give me a pop-up menu. Can we change the sub-grid to display search box like stakeholders sub-grid ?

    7140.4.PNG

    7140.4.PNG

  • Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    I see, field new_responseid is a lookup field from Lead Response to Lead. Please make sure you have published the change, then go to the sub grid property

       First select Only Related Records

       Then look for Lead Response (Response) in entity drop-down.

    Also, can I please suggest you name the field as new_leadid rather than new_responseid, it can be very confusing later because Lead Response record should have a id field value created by Dynamics as new_leadresponseid.

    Regards,

    Abby

  • Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    Regarding sub-grid stakeholder when you click '+' it shows the search box but for Lead Response a new form is opened:

    That's just a default behavior of 'Business Required' lookup field. If you wish to get the same behavior as stakeholder sub grid, you can change the lookup field to be optional.

    Regards,

    Abby

  • Community Member Profile Picture
    on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    First of all, thanks a lot for helping out so far. I've finalized required modification but need a small clarification.

    As shown in below screenshot, I've added few records using main form. But it'd be easier if I get to pick designation initially (when + button is pressed) and allow to type in relevant details to response.

    - What are available options to add values to a text field (type in response) without going to form view ?

    - How do we change what field is mapped to drop-down list?

    7444.5.PNG

  • Suggested answer
    Abby Kong Profile Picture
    6 on at
    RE: Creating a custom entity and adding a sub-grid to Leads form to enter deatails

    Hi Anuradha,

    -What are available options to add values to a text field (type in the response) without going to form view ?

    You can try out OOB editable grid.  However, please note you cannot use an editable grid to add a new Lead Response record.

    To do that, you can:

    1. Go to Entity Lead Response -> Go to Tab 'Controls' -> Add Control -> Editable Grid
    2. Open your subgrid property -> Go to Tab 'Controls'  -> Choose to use editable grid under Web

    Read here for more details and step-by-step guide:

    https://community.dynamics.com/crm/b/razdynamicscrmconsultant/archive/2016/12/29/configuring-editable-grids-in-dynamics-365

    -----------------------------------------------------------------------------------------------------------------------------

    - How do we change what field is mapped to drop-down list?

    Which dropdown list are you referring to? Is it the Roles under stakeholder?

    If yes, they are connections roles. You can find them by:

    Advance find -> Entity 'Connection Roles' -> Hit Result -> See the ones with Connection Role Category = 'Stakeholder'

    3568.stakeholder.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans