I'm pulling my hair out here with something that looks very simple but I just don't manage to get this working.
I need to perform a check on an attribute in context node BuilContact. This attribute was created via the AET.
Some more information:
On the BP_CONT/ContactQuickCreate view we added the field "group flag" under the email address. At the moment the user hits the "back" button to return to the customer screen I need to perform a check to see if the group flag is ticked or not. In an other post here on SCN I was advised to perform the checks in BP_DATA/AccountContactViewset in the EH_ONDONE method.
The view holds a context node BuilContact and when I open up the attributes, the group flag is indeed there. Question now is how I need to read that attribute.
Could anyone shine some light on this very annoying problem please?
lr_entity_cont ?= me->typed_context->builcontact->collection_wrapper->get_current( ).
lr_col ?= lr_entity_cont->get_related_entity( iv_relation_name = 'GetHeaderForContactRel' ).
lr_status_it ?= lr_col->get_iterator( ).
lr_data_property = lr_iterator->get_first( ).
lv_group_email = lr_entity_cont->get_property_as_string( 'Group_email' ).
This gives an error the moment I try to do the Get_first( ) method because the Iterator contains no values. Iterator is bound.