Hello all,
I'm happy with the base Lead and Opportunity entities, but my CRM needs two different data structure for handling two product process. For one product, the existing Lead+Opportunity are fine, but for the other product process, I need individual entities. The reason behind this that there will be many special fields for the second product, which is relevant only for it, so I don't like the idea of mixing two products inside one Lead+Opportunity process.
That's why I started to experimenting with cloning the default Lead and Opportunity entities. I'll refer them as original.
My goals:
Create entity with convert function
Need a way to duplicate entities and layouts
How to clone entity from one instance to another
I also checked the tutorial of eymen-elkum, thanks for it! It's a great inspiration as a base, but unfortunately I failed to follow it, because there are no "SelectManagers" and "Acl" directories inside /application/Espo/Modules/Crm/ - maybe the newest version of Espo changed the structure a little bit...? Hence, I tried to follow the basic principles, here are my results.
I'm using the latest version of the software.
Thanks for any advice:
Radu
I'm happy with the base Lead and Opportunity entities, but my CRM needs two different data structure for handling two product process. For one product, the existing Lead+Opportunity are fine, but for the other product process, I need individual entities. The reason behind this that there will be many special fields for the second product, which is relevant only for it, so I don't like the idea of mixing two products inside one Lead+Opportunity process.
That's why I started to experimenting with cloning the default Lead and Opportunity entities. I'll refer them as original.
My goals:
- I would like to create two new entities for the second product process:
- My Lead, which would be cloned from the default Lead entity;
- My Opportunity, whichwould be cloned from the default Opportunity entity.
- I would like to create the links between them like the originals, so:
- The process would be the same as original: I would like to create My Opportunity record from a My Lead record, by converting.
- I would like to have the relation (link) between them, like the original ones.
- After the conversion procedure, I would like to have set the status of My Lead to Converted, like in the original process.
- When I check a My Lead record's details, I would like to see a Converted To side panel, where the related My Opportunity record is linked
- When I check a My Opportunity record's details, I would like to see the Original lead field.
Create entity with convert function
Need a way to duplicate entities and layouts
How to clone entity from one instance to another
I also checked the tutorial of eymen-elkum, thanks for it! It's a great inspiration as a base, but unfortunately I failed to follow it, because there are no "SelectManagers" and "Acl" directories inside /application/Espo/Modules/Crm/ - maybe the newest version of Espo changed the structure a little bit...? Hence, I tried to follow the basic principles, here are my results.
- I started with cloning the original Opportunity to "My Opportunity", in order to test whether I could create a process "Lead -> My Opportunity". (I haven't tried to clone Leads yet.)
- I managed to clone the Opportinity. A few tries and rebuilds later, I have My Opportunity, which is working (add, edit, list etc.). I made some changes inside the field names and link names inside the php and json files, but I could not make the desired connections, so I can't edit Original Lead at "My Opportunity" details, nor "My Opportunity" link on Lead details pages.
- I extended the Lead entity's detailConvert file (custom/Espo/Custom/Resources/layouts/Clients/detailConvert.json), like in this topic. I saw tanya's comment, but I thought it's worth a try, 3 years passed since 2019.
- When I try to use Convert button on a Lead record, it shows "My Opportunity" next to the three original entities (Account, Contact, Opportunity), but after selecting the My Opportunity option, filling and sending the form, this happens: Lead's status changes to "Converted" state, however the data never make itself into "My Opportunity" (so the base data of the record never inserted, I checked even in the database table). The Lead's record page, the Converted To box is green, but showing only the Account, Contact and Opportunity options (all none). I could not find any clue how this box generated.
I'm using the latest version of the software.
Thanks for any advice:
Radu
Comment