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

Announcements

No record found.

News and Announcements icon
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.

I have the same question (0)
  • Suggested answer
    Vipin J Profile Picture
    1,603 on at
  • Community Member Profile Picture
    on at

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

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    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/

  • Mohsin Ali Profile Picture
    3,634 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans