Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

ms crm plugin question

(0) ShareShare
ReportReport
Posted on by

Entity A has whole number field called wholenumber. Entity A also have subgrid. when the new record is created in the subgrid it should fetch the count from subgrid and update it to the wholenumber field. using plugin.

  • Mohsin Ali Profile Picture
    3,618 on at
    RE: ms crm plugin question

    There are two ways you can use it.

    1. Add a rollup field into 'Entity A' to replace the whole number field.

    2. To achieve it through the plugin, at post-operation of CREATE message of that subgrid record register the plugin. Count all records and then update the whole number field with a total number of associated records from subgrid.

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: ms crm plugin question

    Hi,

    Register your plugin on Post create of Subgrid entity -

    First retrieve Entity A guid from Target context and then use below.

    Now in you plugin logic, you will use fetchxml to find count of the records and then update the count in Entity A.

    Subgrid entity will have Entity A lookup.

    What if Record is getting deleted from subgrid, do you want to again update the count?

    If yes then you may have to write code to do that

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Community Member Profile Picture
    on at
    RE: ms crm plugin question

    without using rollup field .can u suggest me using plugin?

  • Suggested answer
    Vipin J Profile Picture
    1,603 on at

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 671 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 167 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 138 Most Valuable Professional

Product updates

Dynamics 365 release plans