on 06-11-2013 8:36 PM
Hi Gurus,
I am getting an exception on the IC Web Client.
My requirement is to manipulate a text box value on change of the drop down field. I have create an event handler method. And was trying to fetch the drop down list value by using the entity reference object and get_property method. Below is the code in event handler.
lo_lcstatus_entity = me->typed_context->btadminh->collection_wrapper->get_current( ).
IF lo_lcstatus_entity IS BOUND.
lv_lcstatus = lo_lcstatus_entity->get_property_as_string( iv_attr_name = 'LCSTATUS' ).
ENDIF.
But, I wonder, its returning null value and throwing run time exception. Below are are the details with screen shots.
1. Drop down on IC Service request screen. If the status drop down value is changed, then I have to change a text box value with the new value.
2. Technical Details:
3. Exception
4. tried to Debug the root cause. But its shows that ATTRIBUTE_REF value is coming as Initial.
If the BTAdminH attribute_ref is initial, then how the drop down values are getting populated. LCSTATUS attribute is part of the BTADMINH context node.
Please advice.
Thanks,
Kiran Vemula.
Hi Kiran,
LCSTATUS though it appears under the context node BTADMINH, is not part of this entity, it is nothing but the status field which is fetched from the relationship entity of BTADMINH.
Try this code:
entity must be the BTADMINH entity
entity ?= current.
coll = entity->get_related_entities(
iv_relation_name = 'BTHeaderStatusSet' ). "#EC NOTEXT
current = coll->get_current( ).
if current is not bound.
return.
endif.
entity ?= current.
coll = entity->get_related_entities(
iv_relation_name = 'BTStatusHCurrent' ). "#EC NOTEXT
current = coll->get_current( ).
if current is not bound.
return.
endif.
try.
dref = current->get_property( 'ACT_STATUS' ). "#EC NOTEXT
catch cx_crm_cic_parameter_error.
endtry.
ACT_STATUS is the actual field, same code you can find in the GET_LCSTATUS method.
Hope this helps you. Please reward if it solves .
Regards,
Ruby.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.