on 2010 Feb 26 11:20 AM
Hi Experts,
Can anybody guide me how i can "Set default value in dropdown list based on some other dropdown list value"
CRM WebUI -> Account Management -> Search "Accounts" -> Search Crieteria -> In Last search field (4th Row in Search Criteria)
Here in this drop down List when i am selecting "To Be Archived" , "is" in the middle dropdown , i want to set "not set" as by default option in the last dropdown list.
I have searched the sdn and web, but coud'nt find the solution, then posted this. Please guide me step by step with methods
where i need to code and also the code.
I am new in CRM WebUI.
Thanks in Advance !!!
Thanks,
Chitrakant
Hi,
In your search component, Redefine the method get_dquery_definitions, if not already done. Call the super method and get hold of the returned table rt_result. In this table, for the desired field(corresponding to your drop-down field) , specify an event name(SERVER_EVENT). Now, whenever you select a value in the particular drop-down field, an event will be generated. You need not even create an event handler for this. In the same method, (get_dquery_definitions), you can read the currently filled search criteria and depending on the selection modify the order of the operators for the same field.
Regards,
Arun Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Suppose I want to rearrange operators if sales group 'O 20000348' is selected in the DDLB option of the sales_group field, I will do the following. The example is based on component BT115QS_SLSQ.
Data: lr_query type ref to CL_CRM_BOL_DQUERY_SERVICE,
lt_sel_params type GENILT_SELECTION_PARAMETER_TAB,
ls_operator type crm_thtmlb_search_operator.
field-symbols: <fs_op> type CRMS_THTMLB_SEARCH_FIELD_INFO.
*Specify a dummy server event to trigger on drop down selection event.
read table rt_result with key field = 'SALES_GROUP' assigning <fs_op>.
if sy-subrc eq 0.
<fs_op>-server_event = 'DUMMY_EVENT'
endif.
*Rearrange operators based on DDLB selection
lr_query ?= me->typed_context->btqslsquot->collection_wrapper->get_current( ).
lt_sel_params = lr_query->GET_SELECTION_PARAM_TABLE( ).
read table lt_sel_params with key attr_name = 'SALES_GROUP' SIGN = 'I' option = 'EQ' low = 'O 20000348' transporting no fields.
if sy-subrc eq 0.
read table rt_result with key field = 'SALES_GROUP' assigning <fs_op>.
if sy-subrc eq 0.
*Now, I want the 'NE' operator to come up first.
*delete and insert as first record
loop at <fs_op>-operators into ls_operator.
if ls_operator = 'NE'.
delete <fs_op>-operators.
endif.
endloop.
if ls_operator = 'NE'.
insert ls_operator into table <fs_op>-operators index 1.
endif.
endif.
endif.
I have not verified the code, but this is the idea.
Regards,
Arun Prakash
User | Count |
---|---|
17 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.