Sean
Sean

Reputation: 969

Dynamics CRM plugin parent context

I have a requirement to prevent the closing of an appointment from the Contact form (in the list of activities). How can I detect that the appointment was closed from the Contact form? I tried with context.ParentContext.PrimaryEntityName, but it is "appointment" even in this case! The plugin is postoperation synchronous.

Upvotes: 0

Views: 1382

Answers (1)

Plugin does not know from where action is initiated. In your case, you want to identify if the Close appointment action is taken by User - navigate from Contact form.

Better to remove the navigation - Activities from Contact or filter out the Appointments in Contacts - Activities Associated view. If needed, may be a new view can be created & set it as default.

Upvotes: 1

Related Questions