Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Resolving of Case

Posted on by 100

Hi All,

I want to restrict the resolving of case based on option set value on case . Like if the option set value is "no" on case , i want to restrict the resolving of case.  What would be the best approach to do this?

Here are the few approaches i thought of -

1) Writing a plugin on close message . 

2) Writing the plugin on create of incident resolution entity.

Kindly suggest me the best way to do this

Thanks

*This post is locked for comments

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Resolving of Case

    Saw your other post, what’s was the status there: community.dynamics.com/.../283162

    If you are unsure whether the plugin is triggering or not, then simply throw new InvalidPluginExecutionException in first line of plugin & deploy. Then do repro steps, which is close incident. If exception pops out then triggering.

    Do add trace logs using ITracingService for better develop:debug cycle. Use profiler & replay/debug to see the issue.

    Not sure but the special messages were started deprecated like SetState, so Update is recommended message. But could not find any deprecation about Close message.

    Also there is a CloseIncident action introduced, so try to register plugin in that message.

    Btw, In close plugin IncidentResolution will be available as a parameter. MS gives multiple options to achieve the same thing. So good luck.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Resolving of Case

    Hi Vaibhab,

    If I am not wrong there is no such information about incident Close message plugin is not working in v 9.So I would suggest check your incident close message plugin and remove the step and register again with v9 sdk. With that write some trace logs check  why it's failing.

    Second option is better as you probably know that incidentresoulution record create and uptate when incident status change and the relation between incident and incidentresolution entity is 1:N or one to many. So if you write plugin under incident entity incident entity will update  before incidentresolution entity. If any scenario like if you need to retrieve the incidentresolution entity details you have to write in post messages. But if you write plugin in the incidentresolution entity you will get every details in the main operation itself.

    Hope this helps.

  • Vaibhav Jaiswal Profile Picture
    Vaibhav Jaiswal 100 on at
    RE: Resolving of Case

    Hi Ravi/Goutam

    I cannot use workflow as i need some logic to implement.

    Goutam , just out of curiousity why second option plugin on incidentresolution is better than first using of close message ?

    Also one thing i did , was written plugin on close message , it was working perfectly . But as my environment upgraded to 9.0 , the plugin stopped triggering , i dont know why. So again i written my plugin on create of incident resolution it is working fine now

    But any suggestion why it got stopped working in 9.0.

    Thanks

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Resolving of Case

    Ravi's answer is  correct  if  you dont have any other  logic in your plugin you can achieve this using real time workflow - Check below article how to through message using real time workflow.

    survivingcrm.com/.../using-real-time-workflows-to-show-error-messages

    www.cloudfronts.com/using-real-time-workflows-business-validations-dynamics-crm

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Resolving of Case

    Hi Vaibhav,

    You don't need to write custom code\ plugin for this. This can be achieved by creating a real time workflow which works on status change and checks if the status is resolved, if yes then error.

    Hope this helps.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Resolving of Case

    Hi Vaibhav,

    proceed with second options -  Writing the plugin on create of incident resolution entity.

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans