Add Resource Group to Service RRS feed

  • Question

  • Hello,

    I would like to add a resource group to a service instead of the resources within the group, which my code seems to be doing

    My resource spec looks like this

    var resourceSpec = new ResourceSpec {
        BusinessUnitId = new EntityReference(BusinessUnit.EntityLogicalName, businessUnitId),
        ObjectiveExpression = @"
                <Body>udf ""Random""(factory,resource,appointment,request,leftoffset,rightoffset)</Body>
                    <Parameter name=""factory"" />
                    <Parameter name=""resource"" />
                    <Parameter name=""appointment"" />
                    <Parameter name=""request"" />
                    <Parameter name=""leftoffset"" />
                    <Parameter name=""rightoffset"" />
                <Properties EvaluationInterval=""P0D"" evaluationcost=""0"" />
        RequiredCount = 1,
        Name = "Selection Rule",
        GroupObjectId = groupId

    and my service looks like this

    var service = new Service {
        Name = name,
        Duration = duration,
        InitialStatusCode = new OptionSetValue(1),
        Granularity = $"FREQ=MINUTELY;INTERVAL={duration};",
        ResourceSpecId = new EntityReference(ResourceSpec.EntityLogicalName, resourceSpecId)

    All of my code is straight from the plumber van example.

    Any help would be really appreciated.


    Wednesday, June 8, 2016 1:35 PM