Forums

Forums / Developing Portals / Sum up crm records data in to a Custom HTML

Sum up crm records data in to a Custom HTML

4 posts, 0 answered
  1. Kripesh C K
    Kripesh C K avatar
    4 posts
    Registered:
    28 Jan 2021
    16 Feb
    Link to this post
    Hey Guys,

    How to roll up and set child records data in to a Custom HTML?

    Thanks
    Kripesh
  2. Patrick
    Patrick avatar
    33 posts
    Registered:
    20 Apr 2020
    19 Feb
    Link to this post
    Hi Kripesh,

    To sum up CRM records, you may be able to use the aggregate function of the Fetch XML builder. When using the builder, you'll find this checkbox in the top left of the page. Checking that off will allow you to set an aggregate, such as sum, for your attributes.

    Depending on what you're intending to use this for, you could also use javascript to bind to the datasource of a given widget and make any necessary calculations you require. Please review this documentation for details on binding to a kendo datasource: https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/databound

    Also have a look at our client side APIs to run your code as soon as the datasource is ready to be used. Check out the 'tpc:ready' event here: https://www.crmportalconnector.com/developer-network/documentation/portal-connector-widgets/tpc-client-side-api/mvc-based

    Let me know if this helps, or if you need any further details.

    Thanks,

    Patrick
  3. Kripesh C K
    Kripesh C K avatar
    4 posts
    Registered:
    28 Jan 2021
    24 Feb in reply to Patrick
    Link to this post
    Hi Patrick,

    Thank you for your reply, I tried this using grid widget and I am able to set data in to my html content. But I want multiple data fetch in my html content. How can I differentiate the data source such as Grid widget and is there any alternate ways for achieving this?. I am a beginner to The Portal Connector and that's why I am asking.

    Regards
    Kripesh
  4. Patrick
    Patrick avatar
    33 posts
    Registered:
    20 Apr 2020
    24 Feb
    Link to this post
    Hi Kripesh,

    It sounds like Saved Queries might be best suited for this case. Saved Queries allow you to specify a fetch as we spoke about before, and lets you retrieve that data just by making a call to a service. You could create multiple Saved Queries and reference them on the page using Javascript.

    Please check out the following link for some details on Saved Queries: https://www.crmportalconnector.com/developer-network/documentation/how-tos/mvc-based-widgets/how-to-use-the-saved-queries-feature

    Hope this helps!

    Patrick
4 posts, 0 answered