You are on page 1of 12

Presented by Syed Baber Development Lead Mazik Global

The Business Operation Framework service is one of the system services exposed by Microsoft Dynamics AX and that adheres to the Windows Communication Foundation (WCF) protocols and standards. Following are the features of BOF: Allows menu-driven execution or batch execution of services. Calls services in synchronous or asynchronous mode. Automatically creates a customizable UI based on the data contract. Encapsulates code to operate on the appropriate tier (prompting on the client tier, and business logic on the server tier).

To create a Business Operation Framework service, the following steps must be performed: Create a data contract class Identify the parameters passed to the service Register the class as a Business Operation Framework service Optionally customize the automatically generated UI for the class

Attribute based customizations. Attributes are SysOperationGroupAttribute, SysOperationGroupMemberAttribute, SysOperationDisplayOrderAttribute, SysOperationLabelAttribute etc. Code based customizations. Using UIBuilder class. For example check CustRecurrenceInvoiceUIBuilder Class.

To perform validation on contract class, you need to implement SysOperationValidatable Interface and override the validate method. For example of this, check CustRecurrenceInvoiceDataContract class.

To modify the contract at runtime, we need to create a controller class extend from SysOperationServiceController class. Get the contract object by calling the method getDataContractObject from controller class instance and then call the corresponding parm methods of contract class, passing the desired values.

A Business Operation Framework service can be called in four ways: As a menu item. As a batch process. Synchronously. Asynchronously.

Create an Action Menu Item Set the ObjectType to Class Set the Object to SysOperationServiceController Set the Parameters to <ServiceClassName>.<MethodName> Demo Project.

Create a job and create the service method in that job. Demo Project.

To run the service synchronously, edit the menu item: Set the EnumTypeParameter to SysOperationExecutionMode Set the EnumParameter to Synchronous.

To run the service asynchronously, edit the menu item: Set the EnumTypeParameter to SysOperationExecutionMode Set the EnumParameter to Asynchronous

You might also like