Forums › Forums › OroPlatform › OroPlatform – Programming Questions › Show custom entity in datagrid
This topic contains 9 replies, has 5 voices, and was last updated by gopinath93 8 years, 3 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- June 16, 2014 at 3:51 am #33361
I created a new entity (option set) for contact via GUI. How can i show it in a Contact datagrid and add filters and sorters? Thank you in advance.
- CreatorTopic
- AuthorReplies
- June 16, 2014 at 10:37 am #33362
If I understood you correctly you have an entity with OptionSet field and you want to show this field in a grid. If so, I can say you that unfortunately filters and sorters for OptionSet are not implemented for now. We are going to solve this issue in the nearest future.
June 17, 2014 at 12:29 am #33363Yes, that’s right. And how i can show entity in a datagrid?
June 17, 2014 at 5:46 am #33364Klipach,
I experimented some problems with OptionSet via code. Please, read this topic, it may help you. http://oroinc.com/orocrm/forums/topic/new-field-on-existing-entity-best-practices
Thanks!
June 17, 2014 at 7:45 pm #33365Hi klipach,
If you’ve created the entity via GUI the datagrid as well as view/edit/create pages should be created automatically. You can find it under System > Entities menu.
Please let me know if you don’t see your entity there or you meant something else.June 18, 2014 at 3:03 am #33366I added field via GUI and can see this field on “edit” page, but can not see it in a “customer” datagrid (but i need it there). Also i have strange behavior. Via app.php everything works ok but via app_dev.php i get this error
1Fatal error: Uncaught exception 'Oro\Bundle\EntityConfigBundle\Exception\RuntimeException' with message 'A model for "OroCRM\Bundle\ContactBundle\Entity\Contact::specialization" was not found' in /Users/igkl/Projects/oro.lo/app/cache/dev/classes.php on line 4813specialization – is a field added via GUI
June 20, 2014 at 6:51 am #33367I fixed this by running
123app/console oro:migration:load --forceBut got this error again after clearing dev cache. So you should run this command after each cache clear.
December 23, 2015 at 8:53 pm #33368Hi,
I have added a entity in magento order item as “MetaDescription” and type as “Text”. But it is not displaying in magento orders item. But it was in database. Can you help to fix this issue?
Thanks in advance .
GopiDecember 24, 2015 at 6:31 am #33369Hi @gopinath93
Actually “Magento Order Item” do not have separate view page – it is displayed as a grid on the order view page. Also due to restriction that “text” type fields could not be shown on a grid you do not see it.
So, the simplest solution will be the changing “text” type to e.g. “string” (by default limited to 255 characters), of cause if it fits your needs and you do not write much data into your field.
Hope it will help you to solve your issue.December 24, 2015 at 6:44 am #33370Hi Alex,
Thanks for ur support. I changed it to “string”, it is working fine.
Regards,
Gopi - AuthorReplies
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.