OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Remove an aggregate field

This topic contains 4 replies, has 3 voices, and was last updated by  jaimemanuelroman 6 years, 8 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
  • #29299

    jaimemanuelroman
    Participant

    Hello everyone, I need your help: on a first migration I put this code:

    When I run oro: migration:load –force. Everything works fine, the fields are added in the database and in the views.

    In a new migration I put the following code.

    When i run again oro: migration:load –force, changes are applied to the database, that is, the table orocrm_account removes the fid and SSN fields and the orocrm_contact table adds the fid and SSN fields, but the views are not updated, how can I make the changes Of the database are replicated in the views ?. Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #29300

    mfejczaruk
    Participant

    Hello,

    Did you try to clear cache? What’s your environment?

    #29301

    Mike Kudelya
    Participant

    Hi

    Please add the following code to second migration to remove your fields from oro_entity_config_field:

    I have ran these migrations and can see your two fields in the Contact View page:

    Please check if the Contact entity contains these columns:

    Also, could you tell me what version of OroCRM do you use ?

    #29302

    jaimemanuelroman
    Participant

    Hello Mike, when I put this code in the migration:

    I receive this error message: Field “Oro\Bundle\AccountBundle\Entity\Account::fid” is not configurable.

    The “Account::class” that I give as a parameter to “RemoveFieldQuery” is: “Oro\Bundle\AccountBundle\Entity\Account” and the new attributes declared in the “Entity” folder of my bundle, this is the code :

    I would greatly appreciate your help. Thank you

    #29303

    jaimemanuelroman
    Participant

    As the documentation says I have to create an Account class that inherits from ExtentAccount, but then in my controllers there is a difference between “MyBundle \ Entity \ Account” and “Oro \ Bundle \ AccountBundle \ Entity \ Account” and it is not really what I need, what I need is that “Oro \ Bundle \ AccountBundle \ Entity \ Account” be the parent of my “MyBundle \ Entity \ Account” and it works as a true inheritance.

    I would greatly appreciate your help. Thank you

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

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

Back to top