ObjectiveRelation.ObjectiveExpression Property
Applies To: Microsoft Dynamics CRM 2013, Microsoft 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
'Declaration
<DataMemberAttribute> _
Public Property ObjectiveExpression As String
[DataMemberAttribute]
public string ObjectiveExpression { get; set; }
Property Value
Type: StringThe search strategy to use in the appointment request.
Example
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 shows Random.
<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>
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. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Server 2008, Windows Server 2012, Windows 7 (All Versions), Windows 8 (All Versions)
Target Platforms
Windows Server 2008, ,Windows Server 2012, ,Windows 7 (All Versions),
Change History
See Also
Reference
ObjectiveRelation Class
ObjectiveRelation Members
Microsoft.Crm.Sdk.Messages Namespace
SearchRequest
ObjectiveRelation Class
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.