This topic contains 1 reply, has 1 voice, and was last updated by Ivan 9 years, 3 months ago.
- Topic
Hello,
I trying to customize data grid of contacts list, I remove some columns, add account name column without any problem.
But when I’m trying add simple default column without relation –
jobTitle
I get problems with DQL, what I’m doing wrong?datagrid:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181contacts-grid:extended_entity_name: %orocrm_contact.entity.class%source:type: ormacl_resource: orocrm_contact_viewquery:select:- c.id- c.firstName- c.lastName- c.createdAt- c.updatedAt# - с.jobTitle- account.name as organizationName- contactSource.label as contactSourceLabel- email.email as primaryEmail- phone.phone as primaryPhone- CONCAT(CASE WHEN address.regionText IS NOT NULL THEN address.regionText ELSE region.name END, '') as regionLabel- country.name as countryName- address.postalCode as addressPostalCodefrom:- { table: %orocrm_contact.entity.class%, alias: c }join:left:- { join: c.addresses, alias: address, conditionType: WITH, condition: 'address.primary = true' }- { join: c.emails, alias: email, conditionType: WITH, condition: 'email.primary = true' }- { join: c.phones, alias: phone, conditionType: WITH, condition: 'phone.primary = true' }- { join: c.source, alias: contactSource }- { join: address.country, alias: country }- { join: address.region, alias: region }- { join: c.accounts, alias: account }hints:- { name: HINT_CUSTOM_OUTPUT_WALKER, value: %oro_translation.translation_walker.class%}columns:firstName:label: orocrm.contact.first_name.labellastName:label: orocrm.contact.last_name.label# jobTitle:# label: orocrm.contact.job_title.labelprimaryEmail:label: orocrm.contact.email.labelprimaryPhone:label: orocrm.contact.contactphone.phone.labelfrontend_type: phonecontactSourceLabel:label: orocrm.contact.source.labelcountryName:label: orocrm.contact.contactaddress.country.labelregionLabel:label: orocrm.contact.contactaddress.region.labeladdressPostalCode:label: orocrm.contact.contactaddress.postal_code.labelcreatedAt:label: oro.ui.created_atfrontend_type: datetimeupdatedAt:label: oro.ui.updated_atfrontend_type: datetimeorganizationName:label: orocrm.account.name.labelproperties:id: ~view_link:type: urlroute: orocrm_contact_viewparams: [ id ]update_link:type: urlroute: orocrm_contact_updateparams: [ id ]delete_link:type: urlroute: oro_api_delete_contactparams: [ id ]sorters:columns:firstName:data_name: c.firstNamelastName:data_name: c.lastNameprimaryEmail:data_name: email.emailprimaryPhone:data_name: phone.phonecontactSourceLabel:data_name: contactSource.labelcountryName:data_name: country.nameregionLabel:data_name: regionLabeladdressPostalCode:data_name: address.postalCodecreatedAt:data_name: c.createdAtupdatedAt:data_name: c.updatedAtorganizationName:data_name: account.namedefault:lastName: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_ASCfirstName: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_ASCfilters:columns:firstName:type: stringdata_name: c.firstNamelastName:type: stringdata_name: c.lastNameprimaryEmail:type: stringdata_name: email.emailprimaryPhone:type: stringdata_name: phone.phonecontactSourceLabel:type: entitydata_name: contactSource.nameenabled: falseoptions:field_options:class: OroCRMContactBundle:Sourceproperty: labelcountryName:type: entitydata_name: address.countryenabled: falseoptions:field_options:class: OroAddressBundle:Countryproperty: namequery_builder: @orocrm_contact.contact.datagrid_helper->getCountryFilterQueryBuilderregionLabel:type: stringdata_name: regionLabelenabled: falseaddressPostalCode:type: stringdata_name: addressPostalCodeenabled: falsecreatedAt:type: datetimedata_name: c.createdAtupdatedAt:type: datetimedata_name: c.updatedAtenabled: falseactions:view:type: navigateacl_resource: orocrm_contact_viewlabel: oro.grid.action.viewicon: eye-openlink: view_linkrowAction: trueupdate:type: navigateacl_resource: orocrm_contact_updatelabel: oro.grid.action.updateicon: editlink: update_linkdelete:type: deleteacl_resource: orocrm_contact_deletelabel: oro.grid.action.deleteicon: trashlink: delete_linkmass_actions:delete:type: deleteentity_name: %orocrm_contact.entity.class%data_identifier: c.idacl_resource: orocrm_contact_deletelabel: oro.grid.action.deleteicon: trashoptions:entityHint: contactexport: trueerror is:
123request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("[Syntax Error] line 0, col 64: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression, got '?'") in "/fakepath/vendor/oro/platform/src/Oro/Bundle/UIBundle/Resources/views/actions/index.html.twig" at line 206." at /fakepath/vendor/twig/twig/lib/Twig/Template.php line 148 []
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.