This topic contains 1 reply, has 2 voices, and was last updated by Mike Kudelya 7 years, 5 months ago.
- Topic
Hi,
I have followed the Extend Entity using Migrations documentation to the letter. I am extending Account entity where I have added a number of fields. I executed the migrations.
The fields that I have added as enum are only visible in the forms. When I checked the oro_entity_config_field table I can see that only the enum fields have been added to the table. The other string and integer fields are not added to the table.
I am giving the sample migrations code and view.html.twig file code. Please let me know where am I going wrong. I would also like to mention that I tried using both OWNER_CUSTOM and OWNER_SYSTEM in the owner attribute of the field in migrations.
Migrations file:
12345678910111213141516171819202122232425public function up(Schema $schema, QueryBag $queries){$table = $schema->getTable('orocrm_account');$table->addColumn('primaryEmail','string',['length' => 255,'notnull' => false],['oro_options' => ['extend' => ['owner' => ExtendScope::OWNER_SYSTEM],'datagrid' => ['is_visible' => DatagridScope::IS_VISIBLE_FALSE],]]);$this->extendExtension->addEnumField($schema,$table,'status','account_status',false,false,['extend' => ['owner' => ExtendScope::OWNER_SYSTEM]]);view.html.twig file for account:
1234567891011121314151617181920212223242526{% set dataBlocks = [{'title': 'orocrm.account.sections.general'|trans,'class': 'active','subblocks': generalSectionBlocks}] %}{% set basicinfo %}<div class="widget-content"><div class="row-fluid form-horizontal"><div class="responsive-block"><table style='width: 90%;table-layout: fixed'><tr class='rowcol'><td class='hdrcol'><b> {{ 'orocrm.account.accountStatus.label'|trans }}</b></td><td class='valcol' >{{ entity.status }}</td><td class='hdrcol'><b> {{ 'orocrm.account.primaryemail.label'|trans }}</b></td><td class='valcol'>{{ entity.primaryEmail }}</td></tr>The error I am getting is:
1Neither the property "status" nor one of the methods "status()", "getstatus()"/"isstatus()" or "__call()" exist and have public access in class "Symfony\Component\Form\FormView" in OroCRMAccountBundle:Account:update.html.twig at line 59
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.