I looked in the dev guide and online but can’t seem to find any code examples. I’m just trying to convert a lead into a contact.
Appreciate your help
I looked in the dev guide and online but can’t seem to find any code examples. I’m just trying to convert a lead into a contact.
Appreciate your help
Hello,
You don’t need to check code base for the Convert Lead to Contact.
In detail view of Lead, you will have a button to convert Lead.
You can find documentation here https://docs.suitecrm.com/user/core-modules/leads/
It’s basically all in the “Working with Beans” chapter. You just create a new Contact bean, load the lead Bean, copy fields over, save.
You can go looking in the code that drives the conversion screen to look for details, but it’s a bit complicated and might be taking care of things you don’t need.
Thanks guys, I also thought of simply creating a contact and copying all the fields, but isn’t there some kind of a link between the lead and the contact (that was created from that lead?)
There isn’t a proper relationship between the Lead and the Contact created from it. Only a field in the Lead called contact_id gets filled with a value. This is simple to replicate if needed.
yep, will already use this for something else, but this specific task needs to happen in real time
What’s in the attach is exactly what I need, but not sure how to invoke it
Will continue digging around, may be there’s some kind of a plug-in or something out there, not sure
Can you post your exact requirments breaking down into steps?
I can definitely help with a plugin I have created but need to exact requirements first.