简体   繁体   中英

Dynamic selection of component configuration in CRM Web UI

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.

我的 ZLOY BRole 配置

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM