Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 08, 2010 at 11:28 AM

    Solved by me

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Feb 13, 2012 at 02:03 PM

    Hello Rajasekhar,

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

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded