Skip to Content
avatar image
Former Member

How to get pop up window for save on clicking a button??

Hi,

I have created a new button on OPPT screen and linking it to some external web application. I need to pass OPPT ID along with the URL . OPPT ID will be generated only after saving of OPPT . This button is working fine for existing OPPT .

In case of create new OPPT when i click on this button it is not working as OPPT is not saved and OPPT ID field is blank . So i want to get a pop up window for save on clicking of that button in case of create new OPPT .

Please help me out how to do that ..

Any pointers will be helpful..

thanks

Kanika

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Oct 15, 2008 at 08:36 AM

    Hello,

    In your event corresponding to your button you have to create a popup like this :

    popup = me->comp_controller->window_manager->create_popup_2_confirm(

    iv_title = lv_title

    iv_text = lv_text

    iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesno ).

    Then set a close event and open the popup :

    popup->set_on_close_event( iv_view = me

    iv_event_name = 'SAVE' ).

    popup->open( ).

    So if SAVE is your close event you have to check if the user chose yes :

    CHECK POPUP IS BOUND.

    lv_confirm_result = POPUP->get_fired_outbound_plug( ).

    CHECK lv_confirm_result = 'YES'.

    Regards,

    Benoî

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 08:43 AM

    Hi kanika

    Other way to solve your pbm is in crm->transactions->basic settings->define transaction type, you can open your transaction for opportunity and click checkbox of early number assignment. This will generate number when you create new opportunity (before save).

    Best regards

    Pankaj Kumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 09:37 AM

    Hi benoit,

    I am writing javascript code to link to that web application . I need to display pop up on clicking of button that i have created . That button i have created on OPPT screen .I need to display that pop up if OPPT id field is empty .

    can u please elaborate how to do that ??

    thanks

    kanika

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 09:49 AM

    Hi Kanika,

    So before open the popup just get the oppt ID like this :

    Use method get_collection_wrapper to get the context node (BTADMINH I would say) and then just use the get_property or get_property_as_string method of the context node.

    Regards,

    Benoî

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello,

      You have to declare it as an instance attribute of type ref to IF_BSP_WD_POPUP (in your controller implementation class).

      Benoî