changing default types

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vtran
    Junior Member
    • Nov 2015
    • 7

    changing default types

    Hey,

    is it possible to change types like (relationship-)link-types, field-types etc. which were set by default? there are useful fields and relationships which I want to use but with another type..

    For example, I want to edit the relationship-type:
    Campaign campaign One-to-Many contacts Contact

    into

    Campaign campaigns Many-to-Many contacts Contact

    Creating a new relationship like this doesn't work, because
    Link with the same name already exists.

    Thank you in advance
  • yuri
    Member
    • Mar 2014
    • 8626

    #2
    You can't change type of core relationships.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • alasdaircr
      Active Community Member
      • Aug 2014
      • 525

      #3
      I have this working but I think I edited the entityDef directly.

      The campaign field is the campaign that the user originated from (comes from the Lead conversion).

      I think you're wanting to store which contacts the campaign has been sent to ?

      In that case you can have this campaigns relationship in addition, however you will also need to have the record inserted to campaign_contact table at the same time as inserting a 'Sent' log record into campaign_log_record.

      I'm not sure why this doesn't happen by default, as it allows you to see who has been marketed to with a particular campaign. It's a very simple change.

      Comment

      • alasdaircr
        Active Community Member
        • Aug 2014
        • 525

        #4
        You can fix this by renaming the 'contacts' name to 'contacts2' or similar. The name is not important.

        Comment

        • vtran
          Junior Member
          • Nov 2015
          • 7

          #5
          thank you @alasdaircr

          yea you're right I want to list every contact which attended a campaign (event). because it is possible that one contact attended more than one campaign I need this relationship-type. I tried renaming it and it worked :thumbsup:

          but can you tell me how to set search filter to this? I want to filter in "Contacts"-Entity the newly added relationship to "campaigns2", but it won't show up there. There is only the default field "Campaign" (One-to-Many relataionship-type)..

          and also what do you mean by that:
          at the same time as inserting a 'Sent' log record into campaign_log_record.
          ?

          greetings to you

          Comment

          • alasdaircr
            Active Community Member
            • Aug 2014
            • 525

            #6
            Hi yeah so when a campaign is sent, it adds rows to the campaign_log_record table for each recipient. But you would need to modify the code so that when a 'sent' log is saved l it also adds the contact to the campaign.

            So this needs to happen first, and then you can add the filter,

            I will make up a patch because I am doing this exact thing and will post it for you. It's just a few changes.

            Comment


            • vtran
              vtran commented
              Editing a comment
              ok cool, thank you
          • alasdaircr
            Active Community Member
            • Aug 2014
            • 525

            #7


            This will apply against a current installation of Espo. Sorry but you'll need to figure out how to patch it yourself

            I suggest you remove your customisations, and then Admin -> Rebuild and then refresh your browser. this only covers campaign sent from now onwards, not previous ones.

            Also - this is only needed because there is no filtering of the Campaign Log Records which would be much more useful.........

            Comment

            • alasdaircr
              Active Community Member
              • Aug 2014
              • 525

              #8
              By the way vtran I have a patch which introduces eventbrite support into Espo listing it as a separate activity beside Emails / Meetings etc.

              Just incase you're using campaigns to track eventbrite events ?

              Comment

              • vtran
                Junior Member
                • Nov 2015
                • 7

                #9
                Hey @alasdaircr,

                cool patch there! When do you want to make your merge request? I'd rather wait for this before I patch it by myself..

                I don't need eventbrite, but thanks anyway!

                Have a nice weekend

                Comment

                • alasdaircr
                  Active Community Member
                  • Aug 2014
                  • 525

                  #10
                  Not sure they'll accept it? Can see what yuri thinks.

                  Comment

                  • yuri
                    Member
                    • Mar 2014
                    • 8626

                    #11
                    I will think
                    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                    Comment

                    Working...