Dynamic selection of component configuration in CRM Web UI

941 Views Asked by At

I did the following:

  • Created two configurations C1 and C2.
  • Enhanced the View and Classes of a standard Web UI component, added a ComboBox field.

What should I do to select dynamically the configuration? - Example:

  • If the user chooses "A" in ComboBox then C1 should be shown.
  • If the user chooses "B" in ComboBox then C2 should be shown.

My Config for ZLOY BRole

1

There are 1 best solutions below

0
Suncatcher On BEST ANSWER

Use DO_CONFIG_DETERMINATION event of your view, and place something like this:

    IF <ComboBox.Value> EQ "A".
      CALL METHOD me->set_config_keys
        EXPORTING
          iv_object_type          = 'your_object_type'
          iv_object_sub_type      = 'your_sub_obj_type'
          iv_propagate_2_children = abap_false.
    ELSE.
      ...config B
    ENDIF.

Here object and subobject types are the ones you were prompted while creating custom configuration.

The sample implementation of this method one can find in BP_HEAD/AccountDetails standard WebUI component.