OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Issue Adding Call and Email Activity to Custom Entity

This topic contains 5 replies, has 2 voices, and was last updated by  archy_bold 7 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
  • #25093

    archy_bold
    Participant

    Hi there.

    I’m having a bit of trouble adding contact activity to my custom entities, Customer and Order. Rather than do it through the entity management, I’m doing it through migrations.

    So I added the activity associations as outlined in the activity bundle readme which, once migrations have run, adds all the relevant buttons and views to the page. All good so far.

    My troubles start when I actually try to add a call (I guess email too, but without a mailing server setup I can’t test that yet). On submitting I get the following error:

    Neither the property “ac_contact_count” nor one of the methods “getAcContactCount()”, “acContactCount()”, “isAcContactCount()”, “hasAcContactCount()”, “__get()” exist and have public access in class “TrueConnectivityLtd\Bundle\OroCrmBundle\Entity\Customer”.

    Which, on investigation, is because I’m missing all manner of columns related to activity contact on my entity. I found a little information on this in this readme which alludes to an ActivityContactMigrationQuery migration that needs to run. I can see it passing over this migration when running the migration command but the columns aren’t added to my entity.

    I’m using the Magento bundle as my point of reference, but I see nothing related to the ActivityContact Bundle in there.

    Am I doing something wrong? Is there another command I need to run?

    Thanks,
    Simon

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #25094

    archy_bold
    Participant

    A bit more info. I also tried running the following command:

    As the ActivityContactBundle mentions it needing a schema update. However, this didn’t work. I also tried running the migrations after the schema update.

    #25095

    archy_bold
    Participant

    Does anyone have any idea about this? It’s still causing issues. I can’t log calls on my custom entities.

    #25096

    mccar
    Participant

    Hi

    Probably you have created Customer entity as is not extend. Please check it. For correct work ActivityContact must to use extend entity only. We have appropriate bug and will fix it in next release.

    #25097

    archy_bold
    Participant

    Yeah, you’re right. I extended BasePerson, instead of via an ExtendCustomer class. All good now.

    I’m not sure I really understand why I must extend another class, though?

    Thanks for the help.

    #25098

    archy_bold
    Participant

    If anyone else comes across this post, you should do the following:

      Your model should extend an ‘extend entity’ class. Instructions here
      Run the following commands:

    They might not all be required, but this got it working for me.

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

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

Back to top