code: public function doSaveAndPrev($data, $form)
      {
          Controller::curr()->getResponse()->addHeader("X-Pjax", "Content");
          $link = $this->getEditLink($this->getPreviousRecordID());
  
          return $this->saveAndRedirect($data, $form, $link);
      }
docs: Saves the record and goes to the previous one
  @param  arary $data The form data
  @param  Form $form The Form object
  @return HTTPResponse