Hello,
I have a module that opens a separate module to add a new record. When I save the new record the browser goes back to the first module. How do I make it stay on the second module instead?
The request comes from a button.
Base_ActionBarCommon::add('add', 'Create Sell Order', 'href="javascript:void(0)" onClick="_chj(\'create_sellOrder=1\', \'\', \'\')"');
This triggers the following function.
public static function create_sellOrder($r) {
unset($_REQUEST['create_sellOrder']);
$x = ModuleManager::get_instance('/Base_Box|0');
$x->push_main('Utils/RecordBrowser','view_entry',array('add', null,
array( 'sell_order_name'=>$r['quote_name'],
'sell_order_date'=>date('Y-m-d'),
'quote_contact'=>$r['contact'],
'quote'=>$r['id'],
'product'=>$r['product'],
'non_auction_item'=>0,
'auction_length'=>3,
'shares'=>$r['shares'],
'reserve'=>$r['gross_price'],
'gross_total'=>$r['gross_total'],
'commission_rate'=>$r['commission_rate'],
'commission'=>$r['commission'],
'transfer_fees'=>$r['transfer_fees'],
'escrow_fees'=>$r['escrow_fees'],
'net'=>$r['net'],
'net_share'=>$r['net_share'],
'paperwork_sent_date'=>date('Y-m-d'),
'paperwork_sent_to'=>2,
'paperwork_sent_by'=>0,
))
, array('trading_sellorder'));
}
This works okay but takes me back to the requesting module. I would like it to stay in the newly saved record.
Thanks,
Jon