ObjectiveRelation.ObjectiveExpression Property
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online
Gets or sets the search strategy to use in the appointment request for the SearchRequest message.
Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
Syntax
[DataMemberAttribute]
public string ObjectiveExpression { get; set; }
<DataMemberAttribute>
Public Property ObjectiveExpression As String
Property Value
Type: System.String
Type: StringThe search strategy to use in the appointment request.
Remarks
Used in the Objectives property.
The scheduling engine supports three search strategies that are specified in the ObjectiveExpression property. A string that contains the search strategy is a parameter to the search methods. The examples show the valid values.
Least Busy - From the list of resources that can perform that specific service, choose the resource that is the least busy and is available at the requested time.
Most Busy - From the list of resources that can perform that specific service, choose the resource that is the busiest and is available at the requested time.
Random - From the list of resources that can perform that specific service, choose any resource that is available at the requested time.
The following table shows the supported values for an evaluation interval.
Value |
Description |
---|---|
P0D |
Refresh states per proposal. |
PInfinity |
Constantly refresh states. |
P1D |
Refresh states one time per day. |
Examples
The following sample shows Most Busy.
<Expression>
<Body>udf \"MostBusy\"(factory,resource,appointment,request,leftoffset,rightoffset)</Body>
<Parameters>
<Parameter name=\"factory\"/>
<Parameter name=\"resource\">
</Parameter><Parameter name=\"appointment\">
</Parameter><Parameter name=\"request\">
</Parameter><Parameter name=\"leftoffset\">
</Parameter><Parameter name=\"rightoffset\"></Parameter>
</Parameters>
<Properties EvaluationInterval=\"P0D\" evaluationcost=\"1\"/>
</Expression>
The following sample shows Least Busy.
<Expression>
<Body>udf \"LeastBusy\"(factory,resource,appointment,request,leftoffset,rightoffset)</Body>
<Parameters>
<Parameter name=\"factory\"/>
<Parameter name=\"resource\">
</Parameter><Parameter name=\"appointment\">
</Parameter><Parameter name=\"request\">
</Parameter><Parameter name=\"leftoffset\">
</Parameter><Parameter name=\"rightoffset\"></Parameter>
</Parameters>
<Properties EvaluationInterval=\"P0D\" evaluationcost=\"1\"/>
</Expression>
The following sample showsRandom.
<Expression>
<Body>udf \"Random\"(factory,resource,appointment,request,leftoffset,rightoffset)</Body>
<Parameters>
<Parameter name=\"factory\"/>
<Parameter name=\"resource\">
</Parameter><Parameter name=\"appointment\">
</Parameter><Parameter name=\"request\">
</Parameter><Parameter name=\"leftoffset\">
</Parameter><Parameter name=\"rightoffset\"></Parameter>
</Parameters>
<Properties EvaluationInterval=\"P0D\" evaluationcost=\"0\"/>
</Expression>
See Also
SearchRequest
ObjectiveRelation
Microsoft.Crm.Sdk.Messages Namespace
Return to top
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright