Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

How to create a custom section on a form that can be loaded into other solutions?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to develop a custom section on the lead form that displays a summary of information such as total visits and last time a user visited (I have a custom entity called "visit" that contains a lookup between the lead entity and the visit entity). I have a tab on the lead sales insight form that displays a list of visits relative to the given lead, however, I would like to create a summary of the data on the initial (summary) tab as mentioned prior.

There are two key parts I would like to figure out:

  1. How I can get a count of the related visit records
  2. Is it possible to export the specific component rather than the complete form, or is it possible to create the component in C# and import it into the solution and add it from there.

Cheers

  • Ray Profile Picture
    Ray 1,505 on at
    RE: How to create a custom section on a form that can be loaded into other solutions?

    check this link: form-xml-schema

    BTW, i think maybe you can try about PowerApps Component Framework to create your own component.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create a custom section on a form that can be loaded into other solutions?

    Although you dont think that it is a good idea, If I were to do so, do you know of any resources/examples of adding components to a solution/editing the XML with C#?

  • Verified answer
    Ray Profile Picture
    Ray 1,505 on at
    RE: How to create a custom section on a form that can be loaded into other solutions?

    1. If you only want to show the relate visit count number, then you can create a Rollup field for auto count, then you can add this field to your section. Otherwise you can write Javascript to query the relate visit records and count them.

    2. If your solution is managed, then no. If your solution is unmanaged, then you can create a new solution and add the component to it, and do the export or import. You can add component to solution by C#, but i do not think is a good idea to edit the form XML(layout) with C#.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create a custom section on a form that can be loaded into other solutions?

    Hey thanks for the reply.

    Firstly, that is helpful however I need to achieve this in a way that a user does not have to configure it themselves. By this I mean that I can send them something like a plugin that will handles retrieving the count.

    Secondly, I have custom entities that are created using a plugin I have already made so that users can just register the plugin to their dynamics solution rather than having to create the entities themselves (for non-technical users). Like this plugin that creates the entities using C#, I need to create a custom interface to display a summary of the data (the visits entity mentioned in my original question). What I hope to achieve is to create this interface that can simply be added to a form in a section/or added by default to a main form rather than the user having to manually place all of the components on a form.

    Essentially, I just want a pre-made section (without needing the whole form) like that contact part with the visit count and last updated part that can be added to any form by any user without having to add all the fields themselves.

    Is this possible?

  • Inogic Profile Picture
    Inogic 24,102 on at
    RE: How to create a custom section on a form that can be loaded into other solutions?

    Hi Dewers,

    • For retrieving the count of visit entity related to a particular lead, you can create a Rollup field Visit Count on the Lead entity as shown in the below screenshot:

    1custom-section.jpg

    3custom-section.jpg

    You can see the visit count which is related to this Lead record as shown in the below screenshot.

    2custom-section.jpg

    You can also refer below link for your reference

                    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-rollup-fields?view=op-9-1  

    • Please clarify what do you meant by component? If you meant a field or section or tab you put in a form, then you need to export the whole form.

     

    Hope this helps.

    Thanks!

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans