locked
Plugin to Update work Hours for Facility/Equipments RRS feed

  • Question

  • HI Folks,

    I have a requirement tow write a plugin which updates work hours for Facility/Equipments on updation of my custom entity. MSCR 2013 Onpremise

    Thanks in Advance

    Monday, February 2, 2015 6:29 AM

Answers

All replies

  • Hello,

    I am not familiar with facilities and resource groups.. But I'll give it a try :) . You could add a plugin step on update of your custom entity. In that trigger, you retrieve all resource groups from your facilities. For every resource group, retrieve the resources who have a returnedTypeCodeName (attribute of resource entity) = systemuser. Following link gives you a code example to update the workhours of a system user: Sample code to update user’s calendar programmatically (work hours) in CRM 2011

    This one is usefull too:  https://msdn.microsoft.com/en-us/library/gg328023.aspx

    Kind Regards

    Monday, February 2, 2015 12:43 PM
  • You've said what you're trying to do, but you have not said why you cannot achieve this. The previous post gives some starting points; if you get errors, or your code does not behave as expected, can you provide more details of your problem ?

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, February 2, 2015 10:25 PM
    Moderator
  • Hi Guys,

    Thanks for your response,

    I was able to achieve this requirement with a plugin. I have posted in my blog :

    http://nandanblog21.blogspot.in/2015/02/mscrm-2013-workhours-creation-of.html

    Hope it might help You.

    Please Vote if its is helpful.

    • Marked as answer by Nandan21 Tuesday, February 10, 2015 6:38 AM
    Tuesday, February 10, 2015 6:31 AM