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

Notifications

Announcements

No record found.

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,983 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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans