Establishing business object methods

To add a method

  1. Expand the business object that you wish to edit so that you can see its current methods.
  2. Right-click on the Methods heading and choose Add Method.
  3. In the Method Name tab, type a name.

    You may use the Comment field to keep notes and other comments relevant for the current method.

    You can, optionally, specify a Use if condition from the drop-down list. During deployment, the code for this business object method is only generated if the condition is satisfied — that is, the application property is True or False (according to which radio button is selected). For example, you can specify that code for an M3 BE specific method is only generated if the M3 Connector is enabled. This field is set to <always> by default.

  4. In the Method Properties tab:

    Type

    This determines the fundamental purpose of the method. When you create a new method, your setting here will determine the type of the initial pipeline stage for the method. Methods can include several stages and are therefore able to do a combination of delete, find, insert and/or update operations. The method type setting does not establish or limit any of the operations that the method can perform; it is simply a note in Infor e-Commerce Development Studio, which you can use to help identify the purpose of each method. We recommend that you set the type to match the purpose of each method, but there is nothing to prevent a method marked as "insert" from actually making a delete operation.

    Asynchronous Support

    If you check Asynchronous Support, an asynchronous method will be created in addition to the normal method. The asynchronous method can be called from the Invoke Component. The name of the asynchronous version of the method will have the suffix _Async. The method must have no output (resultset) as it cannot be handled.

    Expose as Scheduled Task

    If you check Expose as Scheduled Task, a set of properties will be generated which will make the method available for the scheduling mechanism in the deployed application – it will be visible in the control panel for scheduled jobs in the Administration presentation. The method must have no output (resultset) as it cannot be handled.

    Exposes as Gateway Method

    All enabled methods are available to all HTML-based presentations; if you would also like to make a method available to the XML Gateway, then mark this field. Clear this box to hide the method from the XML Gateway.

    Disable Pipeline

    You can temporarily disable a method by marking this box. This will make the method unavailable to the application (including the Gateway and all presentations), but will preserve its settings so you can re-enable it later.

  5. Click OK.

For an explanation of the Method Attribute tab, see . To set Method Attributes, see the tasks in Setting business object method attributes.

Available method types

Method Type Description
Delete Deletes records from the data source
Find Retrieves data from the data source
Insert Creates new records in the data source
Update Updates an existing record in the data source.
Generic Makes some other type of operation in the database, such as executing a stored procedure.