is it possible to add display logic to edit button like we add for record action buttons
if it is possible where can i add it
I don’t understand what you mean.
What would you want to achieve with that display logic?
for example for leads module if status changes edit button could be hidden
If you are trying to disable editing by hiding ‘Edit’ button, it would still be editable as the pencil icons would still be visible even after hiding the button. Please refer to @pgr post for more
according to this post it is a complicated solution so i am trying to find another solution
i just need to know if it is possible to disable editing and where can i do it i keep changing code in different files but no change is happening
i made code changes in editAction.php file in run function but nothing changed
public function run(Process $process)
{
$options = $process->getOptions();
$baseModule = $this->moduleNameMapper->toLegacy($options['payload']['baseModule']);
$linkedModule = $options["payload"]["recordModule"];
if($linkedModule=='Leads'){
['status' => $leadstatus] = $options;
$this->init();
if ($leadstatus==='Closed') {
$this->close();
return [
'status' => 'error',
'data' => [],
'messages' => [
'LBL_RECORD_NOT_FOUND'
]
];
}
}
//parent module
$baseRecordId = $options['payload']['baseRecordId'];
//linked(subpanel) module
$linkedRecordId = $options['id'];
$linkedAction = 'edit';
$responseData = [
'handler' => 'redirect',
'params' => [
'route' => $linkedModule . '/' . $linkedAction . '/' . $linkedRecordId,
'queryParams' => [
'action_module' => $linkedModule,
'return_action' => 'DetailView',
'return_module' => $baseModule,
'return_id' => $baseRecordId
]
]
];
$process->setStatus('success');
$process->setMessages([]);
$process->setData($responseData);
}
does anyone know the reason
You have to run a symfony cache clear.
bin/console cache:clear
But you should be making your changes in extensions folder, not directly in the original files
where exactly in extension please
There isn’t much Documentation on Development for v8, but what there is, I recommend that you study (all of it).
So you can read this entire chapter:
And then go through all these blog posts, along with the videos they contain: