OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How do I create a simple datagrid?

This topic contains 11 replies, has 5 voices, and was last updated by  ruizalexandre 9 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #35658

    lennart
    Participant

    I haven’t worked with the beta’s of OroCRM and installed version 1.0.0. I have little experience with symfony and wonder how I can a simple datagrid. Is there currently any documentation of version 1.0.0? The documentation on is mostly outdated right?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #35659

    lennart
    Participant
    #35660

    Yevhen Shyshkin
    Participant

    Hello, lennart.

    > https://magecore.atlassian.net/wiki/display/DOC/Oro+Documentation+Home
    Yes, this documentation is outdated, we need to remove it.

    Actual documentation now is here: https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/DataGridBundle/Resources/doc/backend/datagrid.md.

    In OroCRM datagrid defined in declarative style using files datagrid.yml. As an example you can use grids from UserBundle (https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/UserBundle/Resources/config/datagrid.yml) – they are quite simple and easy to understand.

    #35661

    lennart
    Participant

    Thanks!

    #35662

    How to create a simple grid, and when you click on an line, you’re redirected to the view page of this line ?
    Thanks.

    #35663

    Dima Soroka
    Keymaster

    Just wanted to check if you had a chance to review documentation and example listed above, was it helpful or you would like to see something more there?

    #35664

    I finally managed to do what I wanted, thank you for your service and documentation.

    #35665

    How I can make my join with 2 tables?
    I wrote this

    But OroCRM says that I’ve an error

    #35666

    SHAD0WF4X
    Participant

    Is there a field defaultContact in your entity class and have you created a relationship with contact? If you have, there should be a column in your database called something like defaultContact_id. Take a look at the user bundle entities for creating relations.

    If you have done this correctly and your would select o.defaultContact, it will give some other error because it’s an object and not a field. I used this for a join:

    But i did not select o.type. In you case this would be something like:

    I hope this will help you

    #35667

    My entity Account extend from OroCRMAccountBundle:Account.
    But when I use your method I’ve the same error message

    datagrid.yml

    Template.html.twig

    #35668

    SHAD0WF4X
    Participant

    You are close now. Remove o.defaultContact from select. That will do it.

    Else try to remove this too:

    #35669

    Oh thanks for all.
    Have a good day!

Viewing 11 replies - 1 through 11 (of 11 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top