VFW124 Using Business Object SubTypes

VLF Windows Application Development

VFW124 – Using Business Object SubTypes

What are SubTypes?

Business objects may optionally have a SubType associated with them.

For example, a business object named BankAccount might be sub-typed as being a Savings, Check (Cheque) or Investment Account.

The purpose of subtypes is to allow the display of commands (and their associated tabs) for the business object to be conditioned so that they are only visible and useable for certain subtypes.

For example, the command/tab named Transactions might only be validly displayed for Check and Investment accounts.

Likewise, the command/tab named Charges might only make sense when used with a Savings account.

Subtypes are represented by a code that you can associate with a business object instance. For example you might choose the codes SAV, CHK and INV for the three BankAccount subtypes.

You specify how commands and subtypes are related by using the SubTypes tab associated with the business object. For example:

Subtypes should be no more than 5 characters long, and contain uppercase letters of the English alphabet (A–Z) or numbers (0–9) only.

The values ALL, NONE, ALLOTHERS and OTHERS should not be used for SubTypes.

SubTypes are only applicable to instance level commands/tabs.

Any Command that is not enabled for all subtypes needs to have its Default Command option set to Never

Once you start using subtypes for a business object instance list you should use them for every instance list entry.

When you insert or update an entry into an instance list you may optionally specify a SubType to be associated with the entry.

Objective

  • To create an Accounting application with an Account business object using the Instant Prototyping Assistant.
  • Account actions to include Details, Approve, Dates, History, Transactions, Charges and Schedule.
  • To define Subtypes Check, Savings and Investment.
  • To populate the instance list using a hidden filter.
  • To implement Account actions using a common demonstration command handler.

To achieve these objectives you will complete the following:

Step 1. Create a Prototype Accounting Application

Step 2. Define Accounts Subtypes

Step 3. Create a Hidden Filter for iii_Accounts

Step 4. Create a Dummy Accounts Command Handler

Summary

Before You Begin

Complete exercises VFW030, VFW040 and VFW042.