code: public function baseTransform()
      {
          parent::baseTransform();
          $disabled = (!$this->gridFieldRequest->getNextRecordID());
  
          return $this->setDisabled($disabled);
      }
docs: Disables the button if there is no next record
  @return FormAction