on 04-18-2013 7:05 AM
Hello Experts,
I am new to CRM WEBUI development.
I have a scenario, where , On selection of a field in one assignment block, based on the selected field, i have to fetch some data from a table and i have to display that data in another assignment block.
Could someone please brief me on the process that i have to follow.
Thanks,
bkvs.
Hi,
You can follow these steps.
1. Define event handler for selection of field in the first assignment block AB1.
2. If you don't have a context node in AB1 similar to the one in AB2, create a context node in AB1
3. Create the similar context node in custom contoller or component controller whichever you
are using to bind the context nodes between your views.
4. Bind the context nodes in AB1 and AB2 to the corresponding custom/component controller.
5. On selection of field, read the corresponding data and assign it to that context node in AB1.
Now since your context node in AB2 is also bound to this data, the data will be populated in AB2 based on your selection in AB1.
Thanks & Best Regards,
Leon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you LEON for quick reply...
i have progressed in this scenario to some extent and i have struck at the following places.
1) I have a table view fields which are to be made as readonly. But, i am not able to generate get_I_method due to some error. Is there any alternate way for making the fields read only ??
2) How can we convert the table records into entities and then add them in a collection?
Please give ur suggestions !!
Thanks in advance.
what is the error that you got when generating get i method.
2. if your context node is not based on any bol entity, then you should use value node.
you declare one structure like your table and create the object fo type cl_bsp_wd_value_node by exporting that structure variable. something like similat to below one.
lr_entity TYPE REF TO cl_bsp_wd_value_node,
lr_struc TYPE REF TO 'your table structure',
ls_data type 'your structure'.
CREATE OBJECT lr_entity
EXPORTING
iv_data_ref = lr_struc.
now you have lr_entity and you can fetch values into the strcture from the table and use the setter methods to set the data in the entity.
lr_entity->set_properties( ls_data ).
now you have lr_entity with the data. then create object of type CL_CRM_BOL_bo_col syntax
create object lr_col type CL_CRM_BOL_bo_col.
call add method of abvoe collection and send lr_entity to that method.
now you have collection with filled entities.
then use the syntax
me->typed_context->'your context node'->collection_wrapper->set_collection( lr_col ).
User | Count |
---|---|
6 | |
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.