cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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î

Former Member
0 Kudos

hi benoit,

i am doing this coding which u have provided in eh_on___ method . of which type shud i declare this popup variable.

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

As it is giving syntax error .

thanks

kanika

Former Member
0 Kudos

Hello,

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

Benoî

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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î