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 = @"
<Expression>
<Body>udf ""Random""(factory,resource,appointment,request,leftoffset,rightoffset)</Body>
<Parameters>
<Parameter name=""factory"" />
<Parameter name=""resource"" />
<Parameter name=""appointment"" />
<Parameter name=""request"" />
<Parameter name=""leftoffset"" />
<Parameter name=""rightoffset"" />
</Parameters>
<Properties EvaluationInterval=""P0D"" evaluationcost=""0"" />
</Expression>",
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.
Mark