Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
How to run plugin for parent entity AFTER Updating field in the child entity through plugin
I have Order , Order details entities.
there is a plugin running in details which update the total field in the header, after updating the header total there is a plugin to some the Total Order .
the parenet plugin giving error.
how to impleement this scenario ?
If you need to run your plugin on a parent record you have to trigger a plugin message (Update, Associate, SetStateDynamicEntity, etc.) on the parent record at least.
In general I would suggest to trigger both plugins for the Order Details entity as both processes (update total field, summarize total fields) are triggered on the same entity.
For further questions please also provide the exception details.
Hy Jasri- We have faced a similar scenario on Opportunity and opportunity products. We have achieved the functionality by firing a plugin on Opportunity product entity. Our scenario was related to update. In this context we got an opportunity id and then we need to retrieve the opportunity and update the desired field on opportunity entity.
Just make sure you put the context. Depth check if there is any scenario in which you are facing any infinite loop issues.
These related entities in OOB become sometimes weird to handle.
If this answer helps you out, please mark this answer verified.
As per my understanding, you want to update the total in order based on totals in Order details. You have two plugins 1st plugin calculates and updates Order detail’s total field and on the change of total field, you update the Parent order total field.
My Suggestion: Instead of two plugins make it one. If you cannot do that then run your plugin on update/Change of total field in Order details. Fetch parent’s Order details records using fetchxml it might be like the below screenshot.
Replace Parent order with your running order detail’s parent order.
And retrieve those records using service.retriveMultiple.
var orderDetails = service.RetrieveMultiple(new FetchExpression(fectXml));
here you have a list of all Order details list with parent Id.
Then calculate and Update whatever field you want in Order or Order Details.
Note: you already get the parent Order form running order details.
For further details, you can go through Microsoft documentation
Docs link: Entity Operations using the Organization service (Microsoft Dataverse) - Power Apps | Microsoft Docs
For further queries visit: https://www.solzit.com/
Business Applications communities