Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Plug-in on related entities during ‘Cascade All’ action

(0) ShareShare
ReportReport
Posted on by
Hello,
 
On Case (Incident) entity we have Task records associated with it (via 1:N relationship). We have the default 'Cascade-All' behavior in said relationship, so that each time a Case is assigned a different owner, all of its Tasks are also assigned that owner.
 
We'd like to perform some business logic whenever a Task changes ownership. It can happen in two ways - the first via manually assigning the Task record to a different owner, and the second via assigning the Case to a different owner thus assigning the Task (via 'Cascade-All').
 
We have registered a plug-in on Assign message on Task entity and it works well when a Task is manually assigned a different owner. However, when the Case is assigned, and thus assigning its Tasks, the plug-in does not get triggered. 
 
We have read that CRM treats Cascade-Assign operations as Update, rather than Assign. So we also registered a plug-in on Update message on Task. However, when we registered it in Pre-Operation, the Target entity did contain the ownerid, but with its old value, instead of its new value. 
 
Why does CRM keep the old value of ownerid in Target entity, when plug-in is registered in Update Pre-Operation and when used during 'Cascade-All' action? The Update Pre-Operation works well again when the Task itself updates. 
 
What we ended up doing is registering the Task plug-in in Update Post-Operation and taking the ownerid value from Post-Image instead of the Target since it contained the old value.
 

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 >

Product updates

Dynamics 365 release plans