Business Operation Property Attributes

BrowsableAttribute

BrowsableAttribute specifies whether the decorated property should be displayed in the Application Model. Each BO is a class and the default option is to display all of its properties in the node that represents the BO in the Application Model. If you apply BrowsableAttribute with the false parameter to a particular property, then the property will not be displayed in the Application Model.

ContextPropertyAttribute

Apply ContextPropertyAttribute to the BO context property. The attribute provides the developer with the following properties:

  • TypeMatchMode,
  • ObjectsCriteria,
  • ObjectsCriteriaMode,
  • ViewType.

business_operations_13

The TypeMatchMode property allows to set the value of the ContextTypeMatchMode parameter.

ContextTypeMatchMode is a parameter of the context property of a context-dependent BO. It can be one of the ContextTypeMatchMode enum values. This parameter specifies the mode to check correspondences between the context-dependent BO and the type of objects to which the operation may apply. ContextTypeMatchMode includes the following values:

  • ExactObjectType: the business object type must match the context property type strictly.
  • SuccessorsOnly: the business object type must be a heir to the context property type.
  • ObjectTypeOrSuccessors: both scenarios described above are possible. It is a default value.

See the example:

  • c#
  • VB

public class SomeBO
{
  [ContextProperty(TypeMatchMode = BusinessOperationContextTypeMatchMode.SuccessorsOnly)]
  public Order Context { get; set; }
  //...
}

Public Class SomeBO
  <ContextProperty(TypeMatchMode := BusinessOperationContextTypeMatchMode.SuccessorsOnly)> _
Public Property Context As Order
  '...
End Class

The developer can specify and modify this parameter in the Application Model. The node needed for this procedure is Application|Xafari|BusinessOperations|SomeBO.

The ObjectsCriteria property allows to set the value of the ContextTypeMatchMode parameter.

This parameter contains the criteria string, the criterion is calculated on an instance of the selected (current) business object. If the calculation result is False, the BO in the Action list becomes inactive.

The ObjectsCriteriaMode property allows to set the value of the ContextObjectsCriteriaMode parameter.

This parameter specifies how to apply the criterion to a group of previously selected objects. It may be one of the TargetObjectsCriteriaMode enum values. TargetObjectsCriteriaMode includes the following values:

  • TrueAtLeastForOne: at least one selected object should satisfy the criteria.
  • TrueForAll: all selected objects should satisfy the criteria.

See the example:

  • c#
  • VB

public class SomeBO
{
  [ContextProperty(ObjectsCriteria = "[Number] != '010248'", ObjectsCriteriaMode = TargetObjectsCriteriaMode.TrueForAll)]
  public Order Context { get; set; }
  //...
}

Public Class SomeBO
  <ContextProperty(ObjectsCriteria := "[Number] != '010248'", ObjectsCriteriaMode := TargetObjectsCriteriaMode.TrueForAll)> _
Public Property Context As Order
  '...
End Class

The developer can specify and modify both ContextObjectsCriteria and ContextObjectsCriteriaMode parameters in the Application Model. The node needed for this procedure is Application|Xafari|BusinessOperations|SomeBO.

Note:

An algorithm that determines how the described parameters affect the context-dependent BO, is similar to both TargetObjectsCriteria and TargetObjectsCriteriaMode parameters of Actions.

The ViewType property allows to set the value of the ContextViewType parameter.

DescriptionAttribute

DescriptionAttribute is a text description of the BO property. This attribute sets the value of the Description property in the Application Model for the corresponding parameter.

business_operations_12

ToolTipAttribute

The attribute sets the ToolTip property in the parameter's node.