ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 6 replies, has 2 voices, and was last updated by oro_newbie oro_newbie 1 year ago.

  • Creator
    Topic
  • #21816
    oro_newbie
    oro_newbie
    Participant

    To explain best what I would like to do, it’s actually the same thing that Contact Bundle here is doing but for Account Bundle.

    So, whenever we have an autocomplete dropdown of contact bundle (example, when you are creating a case), you can select contact by searching with different properties like namesuffix, lastname, skype etc. I would like to do the same thing for Account bundle. I got the other properties displaying by putting them in services.yml like:

    And then in my search.yml I have this:

    But in my account autocomplete dropdown, I cannot search for an account using their email or phone although they appear in the list. Is my search.yml not being recognized? Do I need to load it somewhere explicitly rather than just overriding?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #22105
    oro_newbie
    oro_newbie
    Participant

    Bump. I hope somebody’s read this and can help.

    #22133
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    By default, an account doesn’t contain email and phone fields, but if you created them in your custom entity, just run this command to reindex search.

    #22136
    oro_newbie
    oro_newbie
    Participant

    Thank you Mike.

    I ran that command and added extra parameter OroCRMAccountBundle:Account and I see that the table ‘oro_search_item’ is getting updated with all my account records. Right now it’s creating individual record for names but later I think it will create for email and phone. Is that what’s supposed to happen? My allowed memory size has currently exhausted while running the command. Do I need to give a timeout option? (–timeout=0 does not work)

    #22138
    oro_newbie
    oro_newbie
    Participant

    I realized what I was missing. Even though I had ‘Custom\Bundle\AccountBundle\Entity\Account:’ declared in my search.yml, the actual Entity\Account file did not exist. So I override it and ran the command:

    and with this the fields from my search.yml started indexing in tables oro_search_item & oro_search_index_text. I guess that’s one good way to check if your search indexed the right fields.

    Though I still get the “Allowed memory size exhausted of … bytes exhausted” error. I guess the only workaround for now is to run the command with offset and limit parameters like:

    which means start from record ID 1 and get 20000 rows and then next

    start from record ID 20000 and get 20000 rows etc.

    Can probably be useful for someone in future.

    #22163
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Try to increase ‘memory_limit’ php directive

    #22176
    oro_newbie
    oro_newbie
    Participant

    Thank you Mike. Will try that the next time I’m running the command.

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

You must be logged in to reply to this topic.