Udostępnij za pośrednictwem


Dimension defaulting - Part 7 (Advanced topics)

Introduction

Concluding this series of blog posts, this section covers additional defaulting patterns and APIs that can be used in advanced scenarios.

This blog post series includes:

DimensionDefaultingEngine

In the previous blog post, the DimensionDefaultingService class was described. It provides the common APIs needed for most defaulting needs. For scenarios not supported by the DimensionDefaultingService, the DimensionDefaultingEngine class can be used directly. This class provides all of the logic for the DimensionDefaultingService class.

The engine leverages a concept called dimension specifiers which is a map of dimensions and values obtained from default dimensions and ledger dimensions. The documentation for the DimensionDefaultingEngine can be found on MSDN.

Defaulting during segment entry

In most cases, the merging of default dimensions to a ledger dimension occurs before the user has begun editing the ledger account combination in a segmented entry control. In some circumstances, the form has logic to perform defaulting as the user enters each segment in the control. In order to do this, the form must respond to events raised by the segmented entry control.

To perform defaulting at entry leveraging the DimensionDefaultingEngine class, the segmentValueChanged() method on the segmented entry control is overridden. Defaulting can then be based on current values in the control providing values for other segments.  This example in Figure 1 adds dimension values from the MainAccount table, merging with other values, as soon as a MainAccount is entered in the segmented entry control.

Figure 1: Sample segmentValueChanged() override to default during segment entry

This concludes this series of blog posts about dimension defaulting.

Comments

  • Anonymous
    May 04, 2015
    Good info in this set of posts.  Thank you for sharing!