I have created a new z component and displaying it as assignment block in the BP_HEAD view there is column called Campaign ID, when ever the user click on the ID then it should navigate to Campaign page CPG_MAIN.
I have found some threads on this.and I have been able to make the id as hyperlink and call the event, but I need to pass the name of the object type for campaign,which I am unable to find out.
I need to call this method in event handler,
CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_ui_object_based
iv_ui_object_type = lv_object_type
iv_ui_object_action = 'B'
iv_component = 'CPTMAIN-OV'
rr_result = lv_descriptor_object.
In parameters iv_ui_object_type and iv_component I am not sure what values I need to pass,earlier I have passed "campaign" and "cpg_main" respectively but that did not help.
Also I tried to get the object type name by writing this code,but neither did this help
*Step 2 Get instance of the core and the root object. For dynamic navigation,
lr_core = cl_crm_bol_core=>get_instance( ).
lr_entity_bt = lr_core->get_root_entity(
iv_object_name = 'Campaign'
iv_object_guid = lv_object_guid ).
CHECK lr_entity_bt IS BOUND.
*Step 3 Create an collection object for navigation
CREATE OBJECT lr_col.
*Step 4 Add the entity to the navigation collection
iv_entity = lr_entity_bt
iv_set_focus = abap_true ).
*Step 5 Get object type
lv_object_type = cl_crm_uiu_ibase_tool=>get_bt_ui_object_type( lr_entity_bt ).
This code gives an exception
CX_CRM_UNSUPPORTED_OBJECT - Object Campaign is not (yet) supported