OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Custom entity in the Sales channel, but it does not appear in the account view

This topic contains 9 replies, has 3 voices, and was last updated by  schmalze 5 years, 11 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
  • #29548

    schmalze
    Member

    Hi,

    We have the following situation:
    – We have a Sales channel
    – We have added a custom entity to the Sales channel (there are some records in the entity)
    – We have business customers and related accounts

    Our problem is that the custom entity does not appear neither in the business customer view nor in the account view. What other settings shall we do in order the custom entity can appear?

    Thanks
    Eszter

Viewing 9 replies - 1 through 9 (of 9 total)
  • Author
    Replies
  • #29549

    Alexander
    Moderator

    Hi @schmalze

    The described, unfortunately, not enough to understand what is wrong.
    Could you please provide more details about ‘custom entity’, how it was created, how it’s linked with business customer and account, how and where you’d like it to appear?

    #29550

    schmalze
    Member

    Hi Alexander,

    1) We have created the custom entity the following:
    – System / Entities / Entity management / Create entity
    – First we added only one field to the entity (string type)
    – We did the the schema update
    – Than we added the custom entity to a Sales channel

    2) Link of the Account view screen: https://prnt.sc/j09yaq
    We assumed based on the descriptions that the custom entity added to the sales channel will appear on the account view (like Lead and Opportunity), but it doesn’t. Why?

    3) Than we linked the previously created custom entity to Business Customer Entity, but it doesn’t help. We tried each relation type (we started the relation from the custom entity):
    – many to many
    – one to many –> this does not work at all, when we want to create the record, there is no possibility to select a business account
    – many to one

    Thanks a lot for your help! Ask, if still not clear our problem.

    Eszter

    #29551

    Alexander
    Moderator

    One more question, could you please tell me which version of OroCRM you use?

    #29552

    schmalze
    Member

    Here is the screen showing version: https://prnt.sc/j0dlt9

    #29553

    schmalze
    Member

    Hi Alexander,

    Is there any news concerning my problem?

    Thanks,
    Eszter

    #29554

    Alexander
    Moderator

    Hi @schmalze

    This issue requires some investigation, I will get back to you ASAP with the answer.
    Thank you for your patience!

    #29555

    schmalze
    Member

    Hi Alexander,

    I look forward to receiving your answer that will contribute a lot to our work with ORO CRM.

    Thanks,
    Eszter

    #29556

    Yurii Muratov
    Participant

    Hello, schmalze.

    As I understood, you want to add custom entity, link it to Business Customer entity and to see this information to related account view page?

    Let’s do a small example how you can do this.

    1. Create new custom entity. In my case, it have test1 name and one string field:

    2. Add new relation to Business Customer entity. In my case, the name of this new relation is test1Relation, type of relation is OneToMany to be able to select multiple values:

    3. Add some records to test1 entity:

    4. After this, you will be able to add test1 entity records as the value of test1Relation of Business Customer entity. Let’s add First and Third records to some customer:

    After you dave the Customer, you will be able to see this data at view customer page:

    5. To be able to see this data at related account page, you have to copy Oro/Bundle/SalesBundle/Resources/views/B2bCustomer/widget/customerInfo.html.twig template and add new tab declaration to it. Copy this template to application/commerce-crm-ee/app/Resources/OroSalesBundle/views/B2bCustomer/widget/customerInfo.html.twig (you can read documentation why we should copy the template here in Symfony documentation http://symfony.com/doc/2.8/templating/overriding.html) and add new tab declaration to this template.

    As this is a very simple example, new tab just will show the data from the string fields of related test1 entities.

    The tab declaration in my case looks like:

    And the full data of customerInfo.html.twig template will looks like:

    After that, if you work in prod environment, please clear the cache, to be sure that the overrided template will be shown instead of original one.

    After that, open related account view page. This page should have new tab at the block of customer information with our test data:

    #29557

    schmalze
    Member

    Thanks a lot for the detailed manual

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

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

Back to top