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.
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.
Thank you mahender.
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
context.MessageName should show update or create
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156