In the controller for the entity I overrode "postActionGetDuplicateAttributes". Basically I copied it from the parent controller and then added the line to change the status before returning the data.
PHP Code:
public function postActionGetDuplicateAttributes($params, $data, $request)
{
if (empty($data->id)) {
throw new BadRequest();
}
if (!$this->getAcl()->check($this->name, 'create')) {
throw new Forbidden();
}
if (!$this->getAcl()->check($this->name, 'read')) {
throw new Forbidden();
}
$data = $this->getRecordService()->getDuplicateAttributes($data->id);
$data->status ='XXXX';
return $data;
}

Leave a comment: