This topic contains 2 replies, has 2 voices, and was last updated by a.azadi 4 years, 7 months ago.
- Topic
Hi everyone. I had a problem with making an entity field auditable. I have a field added to my entity using Migration. Now I want to edit its options and make the field auditable. I searched a little and I found this link: Github
I had this PHP code and function before:
1234567891011public function up(Schema $schema, QueryBag $queries){$customer = $schema->getTable('orocrm_contact');$customer->addColumn('is_confirm', 'boolean', ['default' => false, 'oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],'datagrid' => ['is_visible' => true],'merge' => ['display' => true],]]);}After seeing the link I added this option:
1'dataaudit' => ['auditable' => true]And now finally my code looks like this:
12345678910111213141516171819public function up(Schema $schema, QueryBag $queries){$customer = $schema->getTable('orocrm_contact');$customer->addColumn('is_confirm','boolean',['default' => false,'oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM],'datagrid' => ['is_visible' => true],'merge' => ['display' => true],'dataaudit' => ['auditable' => true],],]);}I added the option but the problem is that the code is not working and I tried to change this field to true and false but it’s not working and it’s not saving any change history.
It there any command that I should run or is there anything that I’m missing here?
I will appreciate your help. I want to make the field auditable to see what changes by whom has been made.Thanks,
Aryana.
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.