Announcements
No record found.
Using a plugin I want to perform different activities upon creation and update.
In the same plugin how can I verify if it is triggered from creation or update and perform activities accordingly
Thanks.
context.MessageName should show update or create
Hello,
You can simply check like following
if (context.MessageName == "Create")
{
//create logic
}
else if (context.MessageName == "Update")
//update logic
{}
You can refer this: msdn.microsoft.com/.../microsoft.xrm.sdk.iexecutioncontext.aspx to know about iexecutioncontext memebers
Thank you mahender.
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.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.