cancel
Showing results for 
Search instead for 
Did you mean: 

BP_CONT: not getting the contact person email value from custom controller

0 Kudos

Hi Experts

not able to find the email address in any of the context node, actually my requirement is while creating the BP contact , get the email address BP_ADDR/StandardAddress STRUCT.E_MAILSMT . take this email id and check whether this email id exists in system if exists throw the error while saving . for this I did the codin in BP_CONT component on save method but while saving some times my custom controller is getting initiated some times it was not containing any value , kindly let me know how can I get the email value of contact person in BP_CONT component in view BPCONTOverview .

here is my code on method eh_onsave

lr_curo_bpcont_custcntrlr ?= me->get_custom_controller( controller_id = 'BP_CONT/BPCont' ).

IF lr_curo_bpcont_custcntrlr IS BOUND.

TRY.

lr_entity_privstdaddr ?= lr_curo_bpcont_custcntrlr->typed_context->privstdaddr->collection_wrapper->get_current( ).

lv_privstdaddr_e_mailsmt = lr_entity_privstdaddr->get_property_as_string('E_MAILSMT'). " Get runtime email value of contact person

lr_entity_bpcategory ?= lr_curo_bpcont_custcntrlr->typed_context->builheader->collection_wrapper->get_current( ).

lv_partner_category = lr_entity_bpcategory->get_property_as_string('BP_CATEGORY'). " Get Partner Category value

CATCH cx_sy_ref_is_initial cx_sy_move_cast_error cx_crm_genil_model_error.

ENDTRY.

ENDIF.

here the problem is some times I'm getting the value and some times I'm not getting value the related objects also through get related entities contact person emial is not getting populated any where

kindly help what is going wrong

Thanks & Regards

Rajasekhar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Rajasekhar,

Could you please share how you resolved this issue? I have the exact same requirement (duplicate check based on email).

Kind regards

0 Kudos

Solved by me

Former Member
0 Kudos

Hi Madhu,

Can you please share how you resolved the issue? I have a requirement to track the change in e-mail, phone and fax values for a contact.

Regards,

~Athreya