Skip to main content
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Source Link
$cancelId = 5;//id for entry to update
$cancel = $this->_cancelFactory->create();
$cancel->load($cancelId);
$cancel->setCancelStatus('Review');
$cancel->save();

But as explained in the answers in here: Deprecated save and load methods in Abstract ModelDeprecated save and load methods in Abstract Model, load and save are deprecated. You should create service contracts for your module.

$cancelId = 5;//id for entry to update
$cancel = $this->_cancelFactory->create();
$cancel->load($cancelId);
$cancel->setCancelStatus('Review');
$cancel->save();

But as explained in the answers in here: Deprecated save and load methods in Abstract Model, load and save are deprecated. You should create service contracts for your module.

$cancelId = 5;//id for entry to update
$cancel = $this->_cancelFactory->create();
$cancel->load($cancelId);
$cancel->setCancelStatus('Review');
$cancel->save();

But as explained in the answers in here: Deprecated save and load methods in Abstract Model, load and save are deprecated. You should create service contracts for your module.

Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

$cancelId = 5;//id for entry to update
$cancel = $this->_cancelFactory->create();
$cancel->load($cancelId);
$cancel->setCancelStatus('Review');
$cancel->save();

But as explained in the answers in here: Deprecated save and load methods in Abstract Model, load and save are deprecated. You should create service contracts for your module.