OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions change views for custom entities created from UI

This topic contains 6 replies, has 3 voices, and was last updated by  Madhur 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.

  • Creator
    Topic
  • #25078

    Madhur
    Participant

    Hello,

    Thanks for a great CRM Application.

    I am facing some difficulties where I have to change the way the detail views look for custom entities created from the UI. Now for the bundles created within the application I can see that there are views folder under Resources/config folder. But for the custom entities created from the UI I don’t see any kind of folder structure in the application. All the files are generated within the Cache folder. The class file is also auto generated within the cache folder based on the information in the database tables.

    All the fields that I created from the UI are coming in a single column format. I need to change it to two column format or some other format. How can I do it for these custom entities created from the UI?

    I also need to create some complex reports for these custom entities. How can I create them? In which folder should I keep them? The documentation says that I have to create a Datagrid.yml style file in my bundle. But I don’t have a bundle. The custom entity has been created from the UI.

    Please help.

    Thanks.
    Madhur.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #25079

    Artem Liubeznyi
    Spectator

    Hi Madhur,

    To create complex behavior for a custom entity you have to create your own bundle, then move entity class files from Cache, and finally create the datagrid and the custom views & forms you want.

    Please refer to the Oro Cookbook for further details.

    #25080

    Madhur
    Participant

    Hi Artem,

    Thanks for the reply.

    I have started working on the same. For a person coming from a Microsoft background it becomes a little difficult to understand at first go, but I am getting the hang of it.

    Thanks again.

    Madhur

    #25081

    Madhur
    Participant

    Hi Artem,

    I created a bundle and the entity as given in the documentation.

    The bundle works perfectly for Admin user. When a user with Sales Manager role logs in, he is not able to view the datagrid. My custom entity ownership is Organization. I have given all the permissions for the custom entity to the Sales Manager role. Inspite of that the user is not able to view the records.

    The logs show one thing:
    [2016-01-07 17:59:18] security.DEBUG: ACL found, permission granted. Voting to grant access. [] []
    [2016-01-07 17:59:18] security.DEBUG: ACL found, no ACE applicable. Voting to deny access. [] []

    When I check in the profiler, the sql statement that is executed has one “AND (1 = 0)” condition added to it. Now I dont know from where this “And” condition is being appended.

    Let me show you the code:

    and the datagrid.yml is

    So what is wrong? What is ACE?

    The Sales Manager user is able to view the detail view, able to create and also delete the record. But the datagrid is giving problems.

    Thanks and Regards,
    Madhur

    #25082

    Madhur
    Participant

    Hi,

    Please, any help regarding this?

    Thanks.

    Regards,
    Madhur

    #25083

    Yurii Muratov
    Participant

    Hi, @mhalapeti.

    Your grid is empty because your user have not access to Organization entity.

    You can change inner join to left. In this case, for this user you should see the records and empty ‘Organization’ column.

    So, your grid definition will be:

    #25084

    Madhur
    Participant

    Thanks Yurii,

    It works!!

    Thanks and regards,
    Madhur

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

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top