Skip to main content

Notifications

Announcements

No record found.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans