Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 2 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
We have a requirement from Customer Experience, why a Case is ReActivated. They are asking for a drop down optionset and it should apprear only once a case is Re-Activated.
I tried Nishant Rana Blog, which creates a plugin and it is supposed to be activated once a Case is Re-Open/Re-Acticated.
Nishant Rana Code is not working for me, It is even running when a case status is Changed(New->In Progress).
My plugin Code below:
var targetEntity = (EntityReference)context.InputParameters["EntityMoniker"];
if (targetEntity.LogicalName == "incident")
Entity incident = new Entity("incident");
incident.Id = context.PrimaryEntityId;
QueryExpression query = new QueryExpression("incident");
query.ColumnSet = new ColumnSet("col1", "reopenflag");
query.Criteria.Conditions.Add(new ConditionExpression("incidentid", ConditionOperator.Equal, incident.Id));
var result = service.RetrieveMultiple(query);
foreach (var entity in result.Entities)
// Get the Columns from the Entity Obj Like this. Depands on type of the Column.
_valueDate = entity.Contains("field1") && entity["field1"] != null ? entity["field1"]).Value : DateTime.MinValue;
int state = ((OptionSetValue)context.InputParameters["State"]).Value;
incident.Attributes["flag"] = true;
incident.Attributes["field1"] = GetValidLocalDate(DateTime.Now);
incident.Attributes["pluginmessage"] = Convert.ToString(context.MessageName);
You should check Case previous status. And if pervious status is Resolved or Cancelled then only you should execute your code.
Two thing you will have to check in your plugin -- Case previous status and Case status value which is coming in Context.
When you check previous status and when case status is changed from New-->Inprogress your code will not get executed as previous status is not resolved or cancelled instead it is new.
Business Applications communities