Announcement

Collapse
No announcement yet.

Drill up/down on linked entities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Drill up/down on linked entities

    Hello everyone,

    First of all I wanted to let the developers know that the software is great, really simple and fast as a mfer on my P4 with 512MB of RAM, setup with nginx on Debian. What would be nice to have, it might've been done already by some hard core users, is the ability to create a filter on linked entities, in this case let's say accounts and contacts.

    For example would be great to do a filter down from the account to the contact/s related like: for each account that hasn't bought anything in the last 2-3-6 months show me the email/phone/whatever field of the related(main?) contact, or for every account that has this field set to this show me this field from the contacts.

    Also you should be able to drill up: for each contact that has this field to yes/no show me this field from the parent account.

    I've been working with Dynamics from MS for too long and I'm comparing the features that I see missing but considering this is open source it looks really good. Dynamics had a main contact from what I can remember and you could drill up/down based on that relationship, but the speed and simplicity of this one is devastating. I read somewhere here that you guys are implementing custom entities, which is great, not my case, I already have too much. I also love the fact that you can add files to entities and the files are separated, not in the DB, and just the reference is kept in the DB. Very nice. BTW upgraded this morning like a breeze, no errors or anything.

    Thank you

  • #2
    Hi

    Thank you for a feedback.

    There is an ability to filter contact by account's field. But you need to have a field with type 'foreign' in contact's entityDefs. There is already such field in contact:

    PHP Code:
            "accountType": {
                
    "type""foreign",
                
    "link""account",
                
    "field""type"
            

    Comment


    • #3
      Hi all,

      I tried modifying /root/application/Espo/Modules/Crm/Resources/metadata/enityDefs/Contact.json to read:

      PHP Code:
      "accountType": {
                  
      "type""foreign",
                  
      "link""account",
                  
      "field""my_custom_field_from_account"
              

      But still no luck. For some reason it still reads the "type" field from the account. I've also tried to modify /root/custom/Espo/Custom/Resources/layouts/Contact/filter.json to manually add a new filter field like this:

      Code:
      ["account","emailAddress","title","accountType","customField"]
      But I got an error, probably because "customField" is not defined. Anyway I feel like the relationship/link between the account and contact is not exploited enough for fun and profit . As of now the only benefit that I see is that I have all my contacts underneath the account but you should be able to filter between contacts based on parent relationships and vice-versa . Also filtering by "type" for each account doesn't seem to work for me.

      The "type" field is also filled with custom values for example: bike buyer, car buyer, painting buyer. I went ahead and made a name/email field(s), with each main contact, for each account that way I can filter the accounts based on a custom field and extract the main contact underneath it for emails and such.

      I really like it a lot and I'll wait on it maybe it will be implemented in the future or it will have more flexibility. You guys are too busy developing it and I don't want to bother you anymore; you're already doing a great job.

      Thanks

      Comment


      • #4
        PHP Code:
        "someNewName": {
                    
        "type""foreign",
                    
        "link""account",
                    
        "field""fieldNameFromAccountEntity"
                

        That should make a trick. Did you crear cache or rebuild after the change?

        Comment


        • #5
          Hmmmm... interesting. It does work, I did a rebuild and it did work. Can I add multiple fields from the account? This is good for now but was wondering for future reference. I can search up and filter for a field that belongs to the account and extract the info for the contact. This is nice. Also what would be nice is to have not filters, and contains this/that. So for example show me all the accounts that have this field NOT this, let's say you have buyer, vendor, publisher, accountant for the accounts and you'd like to see all that are NOT vendor and publisher but they are buyer and accountant. Also let's say I have a varchar field that contains likes product A, likes product B, likes product C, so it would be nice to have a query like "custom_field_from_account contains likes product A and likes product B", anyhow it's really nice as it is but I'm just sharing thoughts of what I've seen in other products. For me I can create custom fields on the accounts and filter by that.

          Nevertheless like I said before it's very, very fast and the stream feature I haven't seen in any CRM out there yet, haven't worked with that many, but it's a great feature. Not only that but the fact that you can add files in the stream is amazing. For example, you can say talked to them on the phone and they've bought seven products from us and attach seven contracts to that stream and you can later see what you did, or for each account, review contracts that some other user added and figure out what's going on. I love the stream feature.

          Thanks man it looks really nice on this end .

          EDIT

          I guess you can select multiple values when you search from a filter to get some values from a field but not all. Hmmmm...
          Last edited by cout; 12-22-2014, 10:01 PM.

          Comment


          • #6
            You can add multiple fields the same way. You can also put this field on detail and list view. But you can't edit this field from a contact.

            The list of values is taken from the list of values of account field.

            Comment


            • #7
              Hi there!
              Regarding the post above, I have added a custom field to the USER entity as userOFFICE (enum, Office A, Office B, Office C. etc). no problem with it.
              I have new Custom Entity and I try to add usrOFC as Search option on Search filters , but when I select this filter on search I get editable Text Field , NOT options (combobox)

              I added MyCustom.json
              fields: {
              .................. "user": {
              "type": "link"
              },
              "usrOFC": { "type": "foreign",
              "link": "user",
              "field": "userOFFICE "
              }

              }

              links: {
              ................
              "user": {
              "type": "belongsTo",
              "entity": "User"
              },

              }


              I rebuild many times , clear cache(s) , coud you pls advice ?
              Thanks in advance ...

              Selcuk

              Comment


              • #8
                Try to add to field defs:
                "view": "FIelds.Enum",
                "options": ["Your", "Options"]

                Comment


                • #9
                  Is it possibe to give more details and/or sample pls. thnx & rgrds

                  Comment


                  • #10
                    I provided enough info:
                    Try to add that params to your usrOFC field in json. I'm not sure if it will make a trick but I believe.

                    Comment


                    • #11
                      Hi,
                      The inter-entity filtering that I need, comes with AdvPack Reports , so you can get AssignedUser.Office etc. Just for info,
                      Selcuk

                      Comment

                      Working...
                      X