Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

As described in "Adding Designing a Layout Control" on page 380, the sample application's Rental Agreements Layout Control enables and disables fields on the Rental Agreements form to provide users with a visual indicator of the current phase of a Rental Agreement and what fields are currently available for editing.

The sample application defines three phases for a Rental Agreement:

  • Check-Out: This is applicable to new records. When checking out a vehicle, only the Check-Out related fields are applicable. The Check-In related fields cannot be modified. See Form in Check-Out Phase.
  • Check-In: Once a vehicle has been checked out, the Check-Out fields can no longer be modified and the Check-In fields are now available.  See Form in Check-In Phase.
  • Complete: Once a vehicle has been checked in, the Rental Agreement is complete, and no additional changes can be made to either Check-Out or Check-In fields in the Rental Agreements record.  See Form in Complete Phase.

The validation to enforce a Rental Agreement's phase is defined in the Rental Agreements Entity Object. However, without the Layout Control, all fields on a Rental Agreements record would appear enabled regardless of the current phase of the rental agreement (as shown in Figure 14.94below). In this case, a user would not be notified of any validation errors until he or she attempts to save the record.
AnchorRTF31303231373a204361707469
RTF31303231373a204361707469Form Without Layout Control
Image Removed
Form Without Layout ControlImage Added
With the layout control linked to the Rental Agreements form, the set of available fields update automatically depending on the current phase of the Rental Agreement.

Anchor
_CheckOutPhase
_CheckOutPhase
Form in Check-Out Phase

During a vehicle check-out, only the Check-Out fields are enabled on the new Rental Agreements record. Check-In fields are disabled, as shown in Figure 14below.95.
Check-Out Phase

Check-Out PhaseImage Added

Anchor

...

_CheckInPhase
_CheckInPhase
Form in Check-In Phase

While a vehicle is checked out, only the Check-In fields are enabled on the Rental Agreements record (so the vehicle can be checked back in when returned). Check-Out fields are disabled, as shown in Figure 14.96.below.

Check-In PhaseImage Added

Anchor

...

_CompletePhase
_CompletePhase

Form in Complete Phase

While a vehicle has been returned and checked in, the details of the Rental Agreement can no longer be modified so all Check-In and Check-Out fields are disabled, as shown in Figure 14.97.
AnchorRTF38363231383a204361707469RTF38363231383a204361707469Complete Phase
Image Removedbelow.

Complete PhaseImage Added