No option to delete lead after conversion ?

Hey there,

Everything is in the title, Im looking for an option to delete a lead after he became an account (after he is converted)

Idk, If I have to code something, or use workflow ? (with the french translation its not really easy to use it, or maybe I dont rly know how to use it, I got to go learn it in the documention ahah)

The only topic about this was 4 year ago, so maybe things have evolved now.

Have a good day !

Sorry, the option does not exist.

You can try it with a Workflow, but you would need a way to detect that the Account creation is coming from a conversion, perhaps by detecting the presence of a certain value in a certain field? Depends on your data.

If you have to do it in code, try in this file

modules/Leads/views/view.convertlead.php

but I doubt it can be made upgrade-safe.

Hey PGR,

In the lead we have a “status” fields wich is marked as converted when its converted. So if status = converted -> Delete.

But in workflow, I cant delete a bean … We can create, Update, Send email, Calculate a fields…

I dont know where or, what to code …

Strange a basic option like this is not by default in the CRM :frowning:

Juste donw it :

Create a workflow and in calculated fields put the delete fields to “1” when a condition (status = converted) is OK.

So when I convert a lead, the status is update, the workflow is fired, delete is put to “1” and I think he is deleted.

is he really deleted ? I think I will have to check in the database.

1 Like

That is correct, set the “deleted” field to 1.

The Lead won’t appear anywhere on the app, but it will still be in the database with “deleted=1”. You can go there and undelete if you want to.

There is a scheduler job called “prune database on 1st of month” which removes these entries from all tables. It is disabled by default.

Damn never saw that !

So I have to activate “Prune Database on 1st of Month” ?

There are many answers to that question, it depends on what you want, and what kinds of backups you keep.

That’s why it’s disabled by default, so that no data gets deleted unless the admins have considered the pros and cons.

It permanently deletes the records marked with “deleted=1”, once a month. If that sounds like a good idea to you, go ahead and enable it.

Yep,

I’ve enabled it. Its like a trashbin that is empty the 1 of each month.

Thats sound OK to me.

My final question is about all the default sheduler, where I can find an explaination of each of them ?

Tried to search in the documentation and on the forum but cant find someone who explain it all.

Want to know that because I dont know if all of them are accurate to me, I dont want to slow down my server with unnecessary task

Thanks again.

There is no place where they are all explained, I’m afraid.

If you search for their names individually, you will find some answers on Google.

Sometimes I even go look in the code to see what they do (that’s one of the upsides of open-source)

Do you know where I can find the code ?

Thats ofc one of the positive point of the open source !

Just use any search software, look for the labels on screen, and then look for the label names elsewhere in the code.

In this case, this will take you here
https://github.com/salesagility/SuiteCRM/blob/master/modules/Schedulers/_AddJobsHere.php

Thanks again for that.

Trying to make that CRON working.

Got a 1&1 shared serv, Already got a cron working tried thoses 2 thing based on my working cron (from another website, not a CRM) but its not working :

          • php7.1 /XXXX/htdocs/SuiteCRM/cron.php > /dev/null 2>&1
          • php7.1 /XXXXX/htdocs/SuiteCRM/cron.php

SuiteCRM tell me this :

          • cd /XXXXXX/SuiteCRM; php -f cron.php > /dev/null 2>&1 
            

But I dont think this will work. Its like for a linux or something.

Try this

* * * * * cd /XXXX/htdocs/SuiteCRM; php7.1 -f cron.php > /dev/null 2>&1

Thanks for your help,

Dont think that can work, here is a template of the one who already work :

0 3 * * 6 php7.1 PATH/TO/backup.php

Like, the cron timing -> The php path/version -> The path to the file.

Tried the same kind of template for suitecrm :

          • php7.1 /XXXX/SuiteCRM/cron.php

Waited 30min but in the admin pannel the last execution of every script is still on “never” …

Well, did you actually try the command I gave you?

Of course !

Waited some minute but still nothing :

Can you paste the results of these two commands please?

php -i | grep  "'_'"
php7.1 -i | grep  "'_'"

Here is the result (the first one dont do nothing)

I’ve tried to execute the php directly through SSH, here is the result :

php /XXXX/SuiteCRM/cron.php
X-Powered-By: PHP/4.4.9
Content-type: text/html


Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /XXXX/SuiteCRM/include/entryPoint.php on line 90

Maybe the error is in the file directly ?

sorry to triple post but I cant edit my damn post !

Sooo I found this topic :

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/4104-cron-help-1and1-shared-server

I comented the same line as his last post.

I’ve executed with this command :

php7.1 /XXXXXXX/SuiteCRM/cron.php > /dev/null 2>&1

And it work !

So I’ve put this in my cron :

* * * * * php7.1 /XXXXX/SuiteCRM/cron.php > /dev/null 2>&1

Annnnnnnnd it work !

Some task execute every minute. Will this not affect my server ?