Hi crew!
I have a custom module similar to documents that is related with Leads and Accounts (and others of course).
So, when I convert a Lead to Account, the last option is “transfer data” from modules relateds, for example, I can transfer the calls, meetings, etc from this Lead to his Account.
But in this transfer isn’t included my custom module. How can I transfer it?
Best Regards,
David
I have accomplished this using workflows… For example, If i have a custom module called “webuser”, and a webuser can be tied to a lead and it can be tied to an account, and
If I wanted to copy the webuser to the account when the lead is converted I can do the following.
Create a workflow On the Leads Module, Run only in the scheduler, Run on all records, NO repeated runs.
Condition: Leads>Converted>Equal To>Value>X
-Only run the workflow on converted leads
Condition: Webuser>WebID>Not Equal To>0
-This will only run the workflow on leads that have a webuser
ACTIONS
Modify Record
Record Type: Webuser
Fields: NONE
Relationships: Accounts:Accounts>Field>AccountID
This is what I have done in the past to accomplish this task. I then set a CRON Job to run the scheduled tasks every 5 minutes. So when a lead is converted, the webusers will be tied to the converted account within 5 minutes.
There is a lot of documentation on how to run CRON jobs. I am running mine on windows, and used this method.
https://suitecrm.com/suitecrm/forum/installation-upgrade-help/2411-problem-with-cron-running-on-windows-task-schedular
2 Likes
Hi Mike!
Thanks for your support!
But, unfortunately, this doesn’t work for me :unsure: :huh:
The cronjob works. Suitecrm detects every lead than has registers in my custom module and executes the workflow. But this registers doesn’t been transfered to the account.
Your instructions are very clear and I’m sure that workflow have been created correctly.
In attached screenshot file:
- Clientes = Accounts
- Propuestas = my custom module
Hi, Looking at your screenshot.
First, I am assuming you have the following 3 joins present
a join between Accounts - Leads
a join between Leads-Propuestas
a join between Accounts - Propuestas.
I don’t think it matters what type of join you have on these, but all three must be tied to each.
In your screenshot, I think your problem is with your relationship. You are modifying the custom module record(which is correct) you are adding a relationship to accounts, and you are adding the ID field, but the ID field is in the Leads module since that is the module you are using for the workflow. I am assuming this ID is the Lead ID, you need to use the Account ID
I will attach a screenshot of one that I did that is working currently. The custom module is called “breeds”, and I want to transfer the records from “Leads” to “Accounts”, just as you are. The “breeds” module has a ‘many to many’ relationship to each of the other modules
You will probably need to turn on “repeated runs” so you can re-run the records you ran previously. I am guessing you added records to the propuestas_accounts join table, but that you put the Lead ID in place of the Account ID, so none of the records are showing up on an account.
1 Like
I am new to this forum and I can’t seem to edit my previous post. The screenshot I previously attached is hard to see since it is not zoomed in, I have attached a screenshot that is a little easier to see.
1 Like
This is amazing!! :woohoo:
Not only you have got resolve this. Also you have got help me to understand how works this relations between modules 
Thank you, thank you very much! 