How to retrive facility/users from service record in MS CRM 2013 RRS feed

  • Question

  • i have created a service in MS CRM 2013 and i have attached a resource (a facility) with it and a selection rule. Now i want some method using which i can identify the facility attached with the service being created. E.g user creates a service in crm and attaches a resource(facility/user) i want to fire plugin on creation of service record which retrieves facility/user from service record and add this to my custom entity.

    After doing some research on Google i found this Go to Service -> Find resourcespecid Search in resourcespec with this ID You'll get GroupObjectId Search in constraintbasedgroup entity with GroupObjectId and in this table you will get Constraint field in which you'll get something like follow

    resource["Id"] == {250ffa41-ac85-e311-9401-005056bf502e}

    retrieve resource Id from Above XML. This resource id belongs to Resource table in CRM with field Resource Type.

    Now i am stuck at this point. I am not able to find any relation between facility and resource entity, hence can not get the facility id attached with the service.

    Now my question is How to fetch a facility id from Service? is it possible or not?

    Saturday, May 3, 2014 7:02 AM

All replies

  • If I remember correctly, this resource id could be the id of a system user, facility or a group of resources that could contain other resources or groups of resources, so there is no direct link. The problem you will have is that the selection rules can be hierarchical and complex in terms of the rules applied. I would suggest using a SearchRequest (http://msdn.microsoft.com/en-us/library/gg334219.aspx) - this will then return you the resources that can provide the given service on the given time.

    Hope this helps,


    Scott Durow
    Blog www.develop1.net    Follow Me
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Saturday, May 3, 2014 6:11 PM
  • Hi Scott, first of all sorry for late reply.

    Even if i use OrganizationReqest for querying the appointments(using SearchRequest) that also requires a list of resource to be queried. But i want resource/facility/Users involved in service! if i do not pass Required Resource list to "AppointmentRequest" it gives me error "Not Enough Resource supplied". I am really struggling with problem with long time and have no solution still!

    Thursday, May 8, 2014 6:53 AM
  • Hi Manish,

    Thank you for using Microsoft Forums and Communities .I have reviewed your question and understand that this needs to be further investigated for your particular environment.

    If the issue still occurs and you need further assistance, I would recommend you to benefit from Microsoft Advisory Services and open a Support Advisory Request with CRM Technical Support at the following link - http://www.microsoft.com/en-us/dynamics/crm-customer-center/contact-technical-support.aspx The Advisory Services are hourly based/ paid. One of our specialized dev engineer will contact you and work with you for the agreed number of hours to address the issue.
    Thank you in advance.
    Please let us know if this helps.

    Nina Peneva
    Support Engineer
    Microsoft Dynamics CRM

    Wednesday, May 28, 2014 5:22 PM