get('record'); if ($recordId && $_REQUEST['action'] == 'SaveAjax') { // While saving Invoice record Line items quantities should not get updated // This is a dependency on the older code, where in Invoice save_module we decide wheather to update or not. $_REQUEST['action'] = 'InvoiceAjax'; } $recordModel = parent::saveRecord($request); //Reverting the action value to $_REQUEST $_REQUEST['action'] = $request->get('action'); return $recordModel; } }