Business suitecrm Technology Tutorial Ubuntu


Suitecrm is absolutely awesome, free and open software to run your organization or business. I’ve messed around with various crm’s like Salesforce but SuiteCRM is just so flexible. Oh, and it doesn’t cost any money. Oh, and if you need help or other stuff you can just pay people to build what you need. I haven’t explored all sectors but most business owners I know have found it to be excellent.

I thought I would have to write a long, detailed tutorial on this but thankfully I landed on this really excellent step-by-step tutorial.

I think there is a better way to install PHP, though, rather than copying all those individual PHP packages, but I’m too busy to look that up now. You can try, but this tutorial works. My only concern is that these packages and requirements might change over time so the one-stop-shop for installing all php packages is probably the better way to go.

I followed all the instructions in this tutorial above and successfully ended up with SuiteCRM running on my Ubuntu server on Digital Ocean droplet platform.

However, there were two things not covered which are important:

  1. It was not SSL encrypted HTTPS:// so at the end of all the installation stuff, I needed to do that and
  2. There was no mention of the important step of setting up the cron jobs which is one of the life-blood features of SuiteCRM since it is very good at sending out workflow reminders and other alerts by email. Cron jobs control this. The instructions are on the install page of the last step, as you can see, but I will make it more clear with a start-to-finish tutorial as follows:

Big Step 1 – Set up the Digital Ocean Droplet

  1. Make sure you already have a domain purchased and reserved for your needs. This is optional but I will assume you’re doing this for tutorial.
  2. Initiate your server / droplet
    I won’t give detailed instructions here because there is lots of documentation out there. I selected one with 2GB of ram (at time of writing it’s $10.00 uSD /month for this) only because the teacher recommended it. I didn’t research hardware specs and what I should do. Your needs may be different. I know using Nextcloud Talk uses a bit of RAM but not sure how much for a large conference.. worth investigating perhaps? I might also recommend calling your subdomain ‘nc’ instead of ‘files’ like I did in my example since you might do much more than ‘files’ with NC. “office.domain” or ‘nc.domain’ or ‘cloud.domain’ might make more sense?
  3. In your domain registrar, point your domain to your server’s name host. In my case it will be digital ocean’s which I will pull from the ‘networking’ section after adding the domain to Digital Ocean. In my case I already had a test domain setup, so what I did was set up a subdomain called “”. The reason you want to do this right away is because
  4. Set up your SSH keys
    Before you install the droplet, make sure your SSH keys are set up properly because you are going to use them a lot in the terminal. Here is some ssh tutorial. Note that it’s a little hard for me to find SSH stuff in the DO backend so for the records it’s at settings / security and then a tab (I think…). If you already have a DO space and SSH keys setup, you are already ready and can use those keys again.
  5. SSH into your new server
    ssh root@

Note 1: Normally at this point when I install a server I do the usual sudo apt update and sudo apt upgrade but the main install script for Postal does this for you it seems.

But… you don’t have a sudo user yet so here you go:

Big Step 2 – Make a sudo (non-root super user) user

Set up a non-root user account on the server. This is to reduce your chances of typing a wrong command and killing all your hard work and data.

This is a nice detailed tutorial on this if you’d like here.

Otherwise, this summaries it:

  • Log into the server as root: ssh root@
  • Make sysadmin user: adduser sysadmin and follow the prompts (should be password prompt and then a few questions)
  • Add new user to the sudo list: sudo usermod -aG sudo sysadmin
  • Switch to new sysadmin user: su sysadmin
  • (Optional) Test the new-found powers by running this and then cancelling: sudo dpkg-reconfigure tzdata

Helpful note
If you find you are not getting prompted for the questions after running the adduser command, it might be because you accidentally ran useradd command like me… weird how it works both ways…

Big Step 3 – Install SuiteCRM

Installing SuiteCRM, as mentioned above, is as simple as taking the time to follow this really excellent step-by-step tutorial

Big Step 4 – Secure your Installation with LetsEncrypt

SuiteCRM is good for moving company and organizational data, so you better protect that data with encryption.

  1. Add the PPA: sudo add-apt-repository ppa:certbot/certbot
  2. Install the certbot: sudo apt install python-certbot-apache
    Note: on Ubuntu 20, it seems to be this one now, so check if you hit any snags: sudo apt install certbot python3-certbot-apache
  3. Test the syntax of, what I believe, are the conf files and apache conf files: sudo apache2ctl configtest. If you get an ‘OK’ message, continue. If you change anything in your conf files, don’t forget to reload Apache after sudo systemctl reload apache2
  4. Enable the firewall: sudo ufw enable
  5. MISSION CRITICAL Right here and right now, be sure you allow the ssh rule in the firewall rules, otherwise, you’ll get locked out of your server like I did. Thankfully with DO if you do get locked out you can go in through their virtual console, but still…So, simply run this line of code to open up SSH in the firewall: sudo ufw allow ssh
  6. Let https traffic through so that Letsencrypt can do its thing: sudo ufw allow 'Apache Full'
  7. Check the firewall status which should show active, as well as show BOTH 22/tcp and Apache Full enabled for both ipv4 and ipv6. Don’t continue until these are both present: sudo ufw status
  8. RUN IT sudo certbot --apache -d your_domain -d www.your_domain
  9. Most questions are easy to answer. choose option 2 forcing redirects to https
    Note! It seems after you choose this it’s forever impossible to connect with regular http:// on port 80. This may be important? Not sure…
  10. Test your domains here to make sure https:// is working. Try going to them in a browser to see if you can still reach the SuiteCRM pages and then the lock icon is on. If not, make sure you’ve typed in https:// before URL. In the future, if you chose ‘redirect all’ in steap 9 above it should not require typing the https:// unless there is a problem.
  11. Repeat steps 8-10 for other domains (ie. if required adjusting as appropriate
  12. When done all your domains, do a dry run renewal to make sure renewal process is working well too: sudo certbot renew --dry-run

Bonus SubSection! How to get rid of Letsencrypt Stuff When everything goes sideways
Sometimes we make mistakes and things go wrong with SSL certificates. If you want to rule out Letsencrypt and your certs from the equation, it’s not entirely simple to get it out of your system, as I thought it was. So, here is your bonus section in case you need it nearby:

  1. Disable the letsencrypt conf file: sudo a2dissite prestashop-le-ssl.conf
  2. Totally uninstall letsencrypt (‘certbot’) sudo apt remove --purge python-certbot-apache
  3. Purge these dirs of their certs:

rm -rf /etc/letsencrypt
rm -rf /var/log/letsencrypt
rm -rf /var/lib/letsencrypt
rm -rf /path/to/your/git/clone/directory (seemed not applicable)
rm -rf ~/.local/share/letsencrypt (seemed not applicable)

BONUS SECTION – Little Tips on Install Page

From the SuiteCRM install page, a few things I had to spend time learning that I think are worth sharing are:

  • the ‘upload’ button on the logo in the ‘branding’ section doesn’t seem to work at that stage. Does it work if you point the file to directory and then not push upload? to confirm…
  • If you have an email setup that will send emails from the system, then you can have that ready. If you are just doing some testing you can use some fake gmail account if you want, I suppose. Otherwise, if you don’t fill anything in it doesn’t hinder your installation, but you will not have the important email notification functionality.
  • The default install script automatically auto-filled my host field as my website domain. Then I got this error message in red: “The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and passwordThe provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password”
    After I changed this auto-filled domain back to localhost (like in the tutorial screenshot) in the host field and pressed ‘next’ everything rolled ahead smoothly again.

Now that you are set up with SuiteCRM, there are a few ‘housekeeping setup things’ I do right after installation, such as cron jobs, setting up your email, etc. You can check that out on my SuiteCRM Post-Installation Housekeeping

I hope this helps you get started with the best CRM around!

suitecrm Technology Tutorial

SuiteCRM Post-Installation Housekeeping

If you’ve been following along any of my other SuiteCRM (“SCRM” from hereon in) blog posts, you’ll know that I’m a big fan of this free and open SuiteCRM software project. As such, I do my best to document things that are either easily forgotten or difficult to find online. Hopefully some of this is valuable to you.

1 – Setting up Basic Outbound Email for Functionality

The built-in email functionality of SCRM is not just for sending emails to people with relative ease (which it can do right inside the interface) but also, if not more importantly, it serves to deliver messages from the Workflow module. For example, if you have a task due and you want an email to remind you, this does that. If you don’t set up the email you will only be able to log in and see your tasks.

This gent did a great, slow and methodical Suitecrm email setup video so it is definitely worth the 7 minutes if you haven’t done this before.

I would like to make a few additional comments, though, on the following points:

“Outbound Email” in Admin

When I first started using SCRM I started by adding an ‘outbound email’ server in that specific spot. However, this seems to not be required / redundant. When you go into ‘Email Settings” and do all the items in the video above, an outbound email server is automatically created. I am not sure why there is access to this via two doors. Perhaps to do a quick adjustment (such as a password change?) later? But you can also do that in “Email settings”. I feel better notes should be left in the “Outbound Email’ section user interface to explain, but until then, unless you have a reason, simply don’t use this section and do your adjustments / setup in “Email settings”

Spam Protection Headaches

I have had a repeated issue where I can perfectly send test emails from SCRM to any email address except an email address that shares the same domain name. For example, let’s say my email in SCRM is I can send perfectly to but emails sent to don’t make it through. I don’t yet know the technical reason for this but it could be something as simple as the server not yet being ‘warmed up’ and still possibly on a ‘spam radar’ or worse yet, a spam blacklist.

As such, I would always start your email setup with a test email to various email addresses that do not share a domain with the system-sending email address as well as emails to ones that do share. It’s very important, obviously, that emails from the system make it to your organization’s email addresses – that’s the entire purpose of the system! If all else fails, and you don’t care about privacy and security, you could probably set up a quick gmail address to do the sending, but this doesn’t look good from a professionalism standpoint or data privacy.

For me, the cause of the problem seemed to be the fact that I changed the "From" Address: * field to an non-existing account called ‘do_not_reply@’ So, the ‘real’ account (the one that had legitimate SMTP server credentials) was ‘orders@’, but I entered ‘do_not_reply@’ and this caused emails to fail to internal email addresses. My theory is that the email service provider has some anti-spoofing technology going on that said ‘Hey. This email came from an SMTP thing on the internet using your domain when an account called ‘do_not_reply’ doesn’t actually exist. They might be spoofing you!’ However, this still doesn’t explain why all the do_not_reply@ emails successfully were received by various gmail and other emails. Anyway, consider making a dedicated, real, email address just for this sending if you encounter this issue.

2 – Jobbing your Crons

As mentioned above, the Workflow module is very powerful and can send messages as well as part of an ‘event’. As described on the /install.php page of SuiteCRM (if you recall), in order to enjoy the full power of the Workflow module, you need ‘cron jobs’ working as per requirements mentioned on install page. Not only that, but SCRM has other internal ‘things’ it needs to do (such as indexing) which require this to work. In short, just do the following instructions from the install page now, but, be careful of one thing and that is to make sure that your folder is actually named ‘suitecrm’ and that it’s located at /var/www/html/ otherwise, adjust the path in the following accordingly:

This is a copy and paste from the installation page in case you didn’t note it:

To Setup Crontab
In order to run SuiteCRM Schedulers, edit your web server user’s crontab file with this command:
sudo crontab -e -u www-data
… and add the following line to the crontab file:

  • * * * * cd /var/www/html/suitecrm; php -f cron.php > /dev/null 2>&1
    You should do this only after the installation is concluded.

If the above wasn’t clear enough for you, here is my detailed explanation:

  1. ssh into your SCRM server
  2. Open the crontab file for editting: sudo crontab -e -u www-data
    Note: if this is the first time creating a crontab file on an ubuntu machine, you will be told so and it will automatically start a fresh one for you. You will be prompted to choose a text editor and it will also advise nano (option 1). Choose this default if you aren’t sure since all you need to do is paste a line of code at the bottom
  3. Copy this line of code: * * * * * cd /var/www/html/suitecrm; php -f cron.php > /dev/null 2>&1
  4. Paste it to the bottom of the crontab file
  5. save changes (control x, enter, etc)

I also had an issue where my cron jobs didn’t start, so it was advised around the internet to run this restart command on it to be sure:

sudo service cron restart

Your crontab stuff is now complete.

You can see if things are working by going into Admin / Schedulers and looking at some regularly-occurring items to see the job logs. Choose one with an interval of ‘As often as possible’ and this will give you a good idea if it’s working.

You can also go to Admin / System Settings and at the bottom view the logs to see if there are any errors if things are supposed to happen but don’t seem to be. Note it’s not intuitive but you have to actually click the job log menu to show any results. It looks blank otherwise. A bit weird indeed. There should at least be an icon to show you that you could /should click it, but it’s not there yet.

Note this tip from documentation, too, in case it affects you:

If you were running your cron jobs as root for some time, due to a wrong crontab configuration, after you fix it, remember to reset correct >ownership and permissions on the entire SuiteCRM directory tree, and then do a Quick Repair and Rebuild

The ‘Quick Repair and Rebuild’ is quite amazing at fixing things you don’t even understand. 🙂

3 – Setting up some Pretty Critical Missing Fields

Payment Method

Surprisingly, this very important field “Payment Method” is missing in both the Quotes and the Invoice module. It’s easy to create but I thought I would provide a quick and easy resource where you can come back here and re-create or create it quickly without doing so much thinking.

First, Quotes module:

  1. Go do Admin
  2. Studio
  3. Hit the home icon which magically takes you to the secretive ‘Dropdown editor’
  4. Click ‘Dropdown editor’
  5. CLick ‘Add dropdown’ button
  6. add ‘pay_method’ before the ‘_list’ in the Name: field at the top
  7. Start building the list as follows (you can copy and paste mine or change the items and the order as you like) hitting the ‘Add’ button after each one is completed:


credit_card | Credit Card
cheque | Cheque
e_transfer | Email Transfer (E-transfer)
eft | Electronic Funds Transfer (EFT)
cash | Cash
wire_trans | Wire Transfer
bitcoin | Bitcoin

(OPTIONAL: Add a blank entry if you want the option of leaving the payment method blank when users are choosing the payment method. Otherwise you’ll be forced to select one as a default – you do this by pushing the ‘ADD’ button with nothing in the item name or display label fields.

  1. Hit save – you should get the ‘This operation is completed successfully’ message

Now you have your Payment method dropdown but you don’t yet have a useable field so let’s make that next.

  1. Hit the home button to go back up a level
  2. Go to Studio
  3. Go to Quotes
  4. Fields
  5. Add Field
  6. Choose ‘dropdown’ drom the ‘Data Type:’ list at the top
  7. Field name: ‘payment_method’
  8. Display Label: ‘Payment Method’
  9. Drop Down List: search for the one you just made above called ‘pay_method_list’
  10. Choose default value
  11. “Save”

Congrats! You now have a usable field but you do not have a visible field – so… it’s still useless. Let’s make it visible:

  1. Studio (you’re getting good at this now!)
  3. Layouts
  4. Edit view
  5. Drag a ‘New row” button over to the ‘Overview’ panel
  6. Drag your new ‘Payment Method’ field onto new row from the left column (you should see it there)
  7. Arrange remaining fields however you like
  8. “save and deploy’ to save and launch your changes
  9. Go create a new quote, and make sure that your changes exist in “Edit View’ after pressing ‘edit’ button in quote

If everything went well, you now have a fully-functional ‘Payment Method’ field in the Quotes module of SCRM.

Update the Detailed View
Now you can repeat steps 1,2,3 and then select ‘Detail View’ and repeat steps 5, 6, 7, 8 to make the same fields visible in the “Detail View’ (the view before you hit the edit view)

Create fields for Invoice Module
Now, let’s repeat the same thing for the invoice module since we’ll need it there too. However, we’ll also want the contents of the quotes module field to convert to the invoice during conversion when the user clicks ‘conver to invoice’. This will happen if we give the field the exact same name in the Invoice module.

I would advise opening the following up in a separate browser tab for convenience: Studio / Quotes / Fields / ‘payment_method_c’ (the one you created above in the quotes module)

Now in a new tab do the following:

  1. Studio
  2. Invoices
  3. Fields
  4. Add Field
  5. Choose ‘dropdown’ drom the ‘Data Type:’ list at the top
  6. Field name: ‘payment_method’ (Exactly the same as you did in Quotes field above)
  7. Display Label: ‘Payment Method'(Exactly the same as you did in Quotes field above)
  8. Drop Down List: ‘pay_method_list’ (Exactly the same as you did in Quotes field above)
  9. Select your default entry, if any
  10. Save
  11. Refresh the ‘Studio / Invoices / Fields’ list to makes sure you see your ‘Payment Method’ field appear (probably near bottom)

If everything is good, you now should have a fully functioning field, which can receive the data from the Quotes module when the user clicks ‘convert to invoice.

The second last steps, as always, is to make it visible to the user and usable via the ‘Layouts’ feature.

  1. Studio
  2. Invoices
  3. Layouts
  4. Edit view
  5. Drag a ‘New row” button over to the ‘Overview’ panel
  6. Drag your new ‘Payment Method’ field onto new row
  7. Arrange remaining fields however you like
  8. “Save and deploy’ to save and launch your changes
  9. Go create a new Invoice by itself (ie. not by converting from a quote to an invoice), and make sure that your new fields exist in the Invoice as an option and that all the dropdowns are working as expected. If everything looks good, go back in and add the same fields to your ‘detail view’ (instead of Edit view) in layouts if youw want to see those same fields after saving and leaving edit view.

If everything is now satisfactory, let’s proceed to the last step which is testing to make sure the new fields make it through an Quote-to-Invoice conversion.

Test the New Fields Through the Quote-to-Invoice Conversion Process

  1. Create a new fake test quote in Quotes module
  2. Make sure your new field(s) have data in them
  3. Pay special attention to exactly what data you put in each test field because you’ll need to check this.
  4. Save your quote
  5. Click the ‘Actions’ button
  6. Select ‘Convert to Invoice’
  7. Did ALL fields perfectly convert over?

If so, you are good to go.

If not, there is probably a problem with the field name. As mentioned above it has to be exact or it won’t make it through conversion.

In my case, I had a failed conversion. The issue was because I had typo’d the field name in the Invoice module and it didn’t perfectly match the original quote module hence – failed conversion. I had to delete the Invoice field and start all over again and recreate it exactly. That’s why we test early and not after we’ve created 10 real quotes, ha.

4 – Dealing with the “Terms” Field and Other Hard-coded Fields

SCRM by default, appends a _c to the end of any custom field that you create. This has a purpose and that is to make sure that your custom fields don’t die when you upgrade your SCRM install. However, in this case, it’s a pain because let’s use the out-of-the-box field name ‘term’ that comes in the Quote module. This field is used to put the poorly spelled ‘Nett 15’ payment terms on the quote. So, I thought I would wisely add a field in the Invoice module (it’s oddly missing as mentioned above) and give it exactly the same name and watch it work.


There is no way to create a field called term because it’s hard coded in the system. When you attempt to create it it will automatically create term_c which, as we know, is not a match and won’t make it through conversion from Quote field to Invoice field.

As such, the workaround for this situation is as follows:

  1. Create a replacement field for the original ‘term’ in Quotes (first). Give it a better name such as payment_terms. This will create a field called payment_terms_c after saving the field. (see instructions above for more details)
  2. Map it to the correct drop field down as per instructions above
  3. Remove the original out-of-box term field from the layouts (effectively archiving it from use forever since no users will be able to see it) – see instructions above for changing layouts
  4. Rename the original term field to ‘Payment Terms-OLD’ in the Display Label field for this field (just trust me otherwise it’s a recipe for pain if it shares the same Display Label)
  5. Insert your newly-created replacement field (payment_terms_c) into the layouts where the old one was. Note: Be sure to do ALL layouts including ‘quick create’ or it will bite you later.
  6. Save and deploy

Now you have your Quotes module field ready to go. Now you just follow the instructions above and create an invoice field with the exact same payment_terms_c field name… or is it ‘payment_terms’… let’s see…

Payment Terms

As mentioned above, the ‘payment terms’ dropdown list has spelling errors (Nett 15, Nett 30) and it’s basically void of specific things you’d probably want. Instead of creating my own, I just updated the existing one, correcting the errors and adding some good ones for our business. You can copy this list below, or adjust as you’d like, but here is the list I ended up with:

Oddly, the dropdown list is called ‘quote_term_dom’ if you are searching for it in the Dropdown Editor section of Studio..


due_upon_receipt | Due upon receipt
due_upon_order | Due upon order placement
due_prior_ship | Due prior to shipping
due_upon_del_rec | Due upon receipt of delivery
due_ord_ship_date | Due on order ship date
net_7 | Net 7
net_14 | Net 14
net_30 | Net 30
net_60 | Net 60
blank | blank

See above for instructions on creating a blank field in a dropdown list

You can edit a dropdown list entry by clicking the pencil icon in the row, making the change, then clicking outside in some white space to mark the change as ready for deployment.

Save the changes with the Save button when complete.

I hope this post helped you get setup more quickly with SCRM.

Business suitecrm Technology Tutorial Ubuntu


It seems like I’m writing a series here on these SuiteCRM (‘SCRM’ moving forward) topics these days so I might as well keep going! If you haven’t read them, these might be of interest:

For this one, I will cover how to dig into the back end of SCRM to modify the way that the Quotes module displays the Line Items in their columns when not in edit mode. The content stuff will come in what I hope will be my last tutorial on this topic.

Disclaimer: I have no idea if any of these changes will survive a SCRM upgrade. Probably you’ll want to save any / all of your modified files somewhere safe when you create them, otherwise you’ll have to do a deep dive into how to do this properly (there is a correct way out there). In short, this is a hacky way to bring extra functionality until the GUI has what we need (hopefully soon, but they’re doing their best)

First, here is a reference link to the line_items.php file so that we are all on the same page and know to find it in our server and elsewhere.

This file is the one that tells SCRM how to lay out the Line Item module within the Quotes module. One would think you could just go in and edit the quotes module and a kind of a ‘sub-module’ for line items but it appears this functionality is still not here. If you are a good developer it would, obviously, be nice to have this built into the GUI so others don’t have to go through the pain of tutorials like these.

Let’s get familiar with the code blocks

For the purpose of this tutorial we will assume we all will be modifying products, not services and not groups, although I’m guessing you could apply the exact same method to those too.

There are two main code blocks in this page that concern most of what we’ll want to manipulate:

  1. This html table row (tr) block that starts on line 155. This one maps which column labels get applied to the headers and maps them.
  2. This second html table row block that starts on line 168

1. Headers and Column Display

This block, as you can see, assigns column widths to each row. I modified mine by adding two more, and doing some math on the column widths to adjust accordingly to hit 99% (which is where it was when I found it)

Then, I copied the following line of code from the example and pasted it right after where it was:

$product .= "<td width='9%' class='tabDetailViewDL' style='text-align: right;padding:2px;' scope='row'>".$mod_strings['LBL_VAT_AMT']."</td>";

The plan is to simply copy a line of what’s working, double it, and see if it shows up as a double. You can then modify stuff after you see it’s working (that’s my method). You can see that I modified the width a bit. You might want to try a more extreme number to see the results when the show up.

Then, I went into my terminal to add my changes in with the following steps:

  • Navigate to your Products_Quotes module directory:
    cd /var/www/html/suitecrm/modules/AOS_Products_Quotes
  • Open the file for editing: nano nano Line_Items.php
  • Drill down to the correct block. For me, I commented out the entire tr block with the php /** and */ comment lines so that I could just uncomment them, erase my code and have it back to normal again. Up to you. Once you find it, paste in the above line of code into the block.
  • Save your changes in your terminal (for me it is control x and save changes)

At this point, you will not see any changes in SCRM even if you refresh the browser. You need to perform these steps which I will then call ‘Repair / Rebuild’ after explaining them here:

  1. Go to ‘Admin’ in SCRM
  2. Go to Settings / Repair
  3. Select ‘Quick repair and rebuld’ option.
  4. Wait for changes
  5. Refresh browser to check changes

At this point you should see your column heading doubled, but there will be no content in the cell. That is because you need to do the next part which is to create the lines in the next code block

Mapping in the cell data to the cell

Now you should see your newly created header in the quotes module with line items.

Now we need to map the corressponding lines to that cell.

From my understanding there is one header per cell data and you have to map them in order. So if you wanted “Happy Tax” to be your fifth column / cell in the quote, you’d put it in the fifth position in for the header and then in this code block put it in the same position in the list. I just copied and pasted the same one, in the same posistion as my example above. This next one corresponds to the header I made above:

$product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt, $params)."</td>";

After adding this extra one, saving my changes, and doing the Repair / Rebuild, the data now showed up in the cell.

You have now successfully learned how to display the header and the cell content in the detail view of the line items in the Quotes module of SCRM. However, it’s still not useful since there is nothing mapping from the Products module. Hopefully that will be my next blog if everything goes well!

Hope that helps

Business suitecrm Technology Tutorial Ubuntu



As always, SuiteCRM is one of my favourite business tools in the free and open software world. I like to describe it as ‘Sales Force on steroids’ because you can do whatever you want with it, basically, since the code is open and community supported. However, once in a while you will hit a road block.

This literally took me two weeks, full time, serious pain. Granted I didn’t know a drop of PHP, but wowzers – hard. The good news is this is going to save you that much time or more.

First of all, for some reason this really useful page evaded me for the first week. Had I found this everything would have made a lot more sense sooner. So bookmark this important page about SuiteCRM customizations. This page will be very useful if you plan to really dig deep and customize things for yourself and others.

This tutorial is assuming you have root access to your server and you are doing things ‘on the fly’ like me and not with a proper developers environment – a real weekend warrior hack space. If you are a real developer with skills, bonus! You can probably just upload your work and not worry about root user stuff maybe. In either case this will save you time.

Note this: SuiteCRM has periodic upgrades, of course, and if you do things the way they like your customizations will make it through the upgrade. Otherwise, you stand to lose your work when they upgrade. I would recommend documenting stuff as you go like I’m doing here in case you have to rebuild stuff. Ideally everything I’m doing here should be built right into the GUI, but for some reason it’s not for this part. Hopefully someone can take my work here and build this line item functionality right into the GUI.


The customization of the row headers is essentially a ‘language-translation’ approach. This makes sense because if you were German you would want the word ‘List’ and ‘Price’ to be in German. However, unlike most of the other parts of SuiteCRM (‘scrm’ from now on) you can’t seem to edit these from within Admin / Studio – the logical place you would expect to be able to do this. I believe it is very rare that this kind of customization would be required however, more control over this part is, in my opinion, critical because of the various tax rates and other needs. In my case I needed to add recycling deposits and environmental fees to the row, but others I know needed multiple taxes.

In this case, we want to modify the strings / language that are found in this en_us language file.

Also it is worth mentioning that you should not change the pre-pending part of the php file as suiteCRM will go through and scan for that. So if you are using en_us (the default) make sure that stays at the front of your modified PHP file.

For this example, I want to change line 161 which has this:

‘LBL_UNIT_PRICE’ => ‘Sale Price’,

I don’t like the word ‘Sale Price’ and I want it to say ‘POOPY PRICE’ (to be sure it jumps off the page when it’s working)

Before we go forward, the documentation above fails to mention two important things:

  1. You must be root / sudo user in order to modify anything beyond the /modules path and
  2. There is no pre-existing ‘Language’ directory at all – you must create it first

This is the format and location of where your newly-created file will go and look like. Study it deeply:


Now let’s run the actual example step by step.


As mentioned above, this string ‘Sale Price’ is found stock in this en_us language file in the AOS_Quotes module. So the first step is to be sure you are modifying the correct module. Adjust the paths according to your needs.

  1. Log into your SuiteCRM instance
  2. Change to root user (in my case with sudo su) and of course be careful since you can kill everything now, ha
  3. Navigate to the Ext folder: cd /var/www/html/suitecrm/custom/Extension/modules/AOS_Quotes/Ext/
  4. Make the ‘Language’ directory that SCRM needs: mkdir Language
  5. Navigate into it: cd Language
  6. Create a new blank php language customization file into which you will paste your code: sudo nano en_us.myTestFile.php
  7. Paste in this example code:
$mod_strings['LBL_UNIT_PRICE'] = 'SLOPPY PRICE';
  1. Control x to save your changes in the terminal (if you are using Ubuntu, if not not sure…)

At this point, in your test quote in SCRM you will see no changes it seems. I refreshed, I did a control + F5, I edited the quote, I did everything. My changes did not show. Then, I did the quick repair and build, refreshed changes and there was my new POOPY PRICE header. So these are those last steps after you make a customization:

  1. Go to ‘Admin’ in SCRM
  2. Under ‘System’ go to ‘Repair’
  3. Select ‘Quick Repair and Rebuild’
  4. Go back to your quote and refresh the page – your changes should now be visible in the header.

Very likely the process is the same for modifying all strings in SCRM so be sure to dig into that resource link above if you plan to go further.

I hope this helps and saves you the pain I had to go through! 🙂

Business suitecrm Technology Tutorial Ubuntu

How to Back Up your SuiteCRM Stuff on Ubuntu Server

Been a big fan and user of SuiteCRM for years. Never really did learn how to properly back up from my own server so yeah. Time to do it!

Backing up your SuiteCRM MYSQL Database

This is not for saving the files (ie. the custom settings you have made to SuiteCRM over the years and all the PDF templates, workflows, etc). This is just a raw datadump of the database. Be sure also to back up the suitecrm app files as a separate step (to be documented)

  1. ssh into the server with the usual ssh username@
  2. cd to a location where you would like to back things up. I’ll just do the home directory for mine:
    cd ~
  3. Create a directory into which your backup will go. I will do example in home directory with directory name ‘suitecrm_backups’:
    mkdir suitecrm_backups
  4. CD into this new directory:
    cd suitecrm_backups
  5. Perform this command inserting the appropriate data:
    mysqldump -u admin_user -p suitecrm_DB_name > suitecrm_backup_yymmdd.sql

If you happen to forget the name of your database, you can log into mysql with your user/pw and use this command to show all databases. Login mysql -u admin_user -p and then show the databases with show databases;

  1. After the quality dump, look inside directory to make sure it’s all there and looking good:
    ls -al | grep suitecrm_backups
  2. Great! Now you’ll have to go and get that file off your server and you can skip to the ‘Retrieving Your Backed-up Files’ section below to do that now if you’d like.

Special thanks to this blog

Backing up your SuiteCRM Files

Now that you have your mysql database is backed up, create a file on your server where the soon-to-be backed-up SuiteCRM-specific files will go. It must be writable by the SuiteCRM user so I put mine right in the SuiteCRM folder in var/www/html/suitecrm’, although not sure if that’s a good idea. I’m just not smart enough to know but it did work. I’m pretty sure this folder would not make it through an upgrade, though, so we’d have to back up just before the upgrade and then re-create it after, I’m guesssing.

  1. Navigate to a good place: cd / var/www/html/suitecrm
  2. Make the backup directory: mkdir suite_backups
  3. Give directory correct permissions:
    sudo chown -R www-data:www-data /var/www/html/suitecrm/suite_backups
    sudo chmod -R 755 /var/www/html/suitecrm/suite_backups
  4. In the Suitecrm user interface, go to ‘Admin / Backups’
  5. Enter the path to the directory you just made in step 2 in the ‘directory’ field. Mine looks like this with the ‘var’: /var/www/html/suitecrm/suite_backups
  6. Enter the name of the file you want to call the zip file (ie. NOTE it seems that the system does not append the .zip so you have to make sure to manually enter it in this field.
  7. Confirm your settings. If it’s good you will be able to press ‘Run Backups’ button otherwise you’ll be told what is wrong.
  8. Press “Run Backups”
  9. If everything worked well it will tell you it was done correctly and sitting in the folder.
  10. Check to make sure it’s there with ls -al
  11. All good? Go ahead and download it using the cool sftp tool in the “Retrieving Your Backed-up Files” section below.

Retrieving Your Backed-up Files

  1. Open new terminal window on your local machine if you are like me and already logged into your suite machine in the original window above.
  2. In your new terminal window, navigate to where you want the backup files to end up. If you do nothing, they will end up in your HOme directory, but this is the one slightly weird thing to me. You can’t really change this later so do it now for simplicity, or at least note all your stuff will end up in your home directory.
  3. Log into the server in nearly identical way as ssh: sftp user@ and enter password when prompted
  4. Navigate to your file using your familiar cd and ls commands. So easy. In fact, just like ubuntu terminal navigation…
  5. When you track down your desired file, do a get and wait. You should see some ‘fetching’ comments and then it will end. Check to make sure you have it.

Hope this all helps. Thanks to the team at SuiteCRM.

suitecrm Technology Tutorial


Has your Suite CRM global search broken? I hear you. Hard times. I actually went through the entire process of upgrading our whole instance for about a month and after finishing all that, it turns out it was just this broken index! Good news is that the newer version of Suite CRM is about ten times more awesome so I’m glad I was forced to upgrade. But here’s the point – this tutorial might be all you need to fix your Suitecrm broken global search.

The problem is that if you are in a shared host environment like me and not very skilled it’s just downright scary to perform some of the tutorials I found. I had no choice but to give it a shot and thankfully it worked. Hopefully this tutorial will remove some of the fear for you that I had to go through.

First, as always, none of this would have been possible without all the history of awesome developers who put their code into the Suitecrm project. I will refer to a few specific folks but there are many others involved as with any free software proejct. To you we are all thankful and hopefully this tutorial helps others join the Suitecrm project.

Next, let’s talk about the task at hand

Before We Begin

I find it’s useful to look at the steps in a casual way before doing them. No one really does this in tutorials but I find it lowers stress levels when you approach each step. What we’re going to do here is just back up a few things so we don’t kill our crm forever if we make a mistake, rename a folder, learn a couple of new things in Phpmyadmin (some tool in Cpanel and elsewhere), delete a bunch of old rows in a database table that’s making your Global Search broken, and then tell Suitecrm to ‘start indexing afresh’. That’s it. So remember, ‘If Wayne can do it, you can do it too. Just take your time.

I am assuming that you are using a Cpanel shared hosting environment. If you aren’t, I’m guessing that you are probably smarter than me anyway and this tutorial will feel to baby-like. Feel free to skip to this tutorial here if that is you. Pretty much all of what I’m doing is from that but he didn’t explain a few things I simply couldn’t figure out online.

Step 0 – Advise Others Not to Use SuiteCRM

I always tell others to not use the crm when I do maintenance. Probably you should advise the same.

Step 1 – Back up your Whole Suite CRM instance

In theory you ‘could’ skip this step but I’ve learned it’s worth it. We’re only renaming one directory in this tutorial so if you are careful you could skip it. But since you probably need a recent backup anyway, why not do it?

  • a) Go to file manager
  • b) Go to your suite crm install folder and back it up. There are two ways to do it I’ve learned. You can compress it where it is with the Cpanel compress tool and then just download to your computer or, better, use an FTP tool and get it that way. Both work.

Step 2 – Back up your MySQL Database

Besides your files in Step 1, these database files are the other critical files to back up.

  • a) Go to ‘backup’ section of cpanel,
  • b) go to “Download a MySQL Database Backup”
  • c) select the database asssociated with your suitecrm and click it. If you don’t now what your database is, and you have a few, then there are two ways to figure it out:
  • if you installed by Softaculous, you can just search Suitecrm in the search field, find your install and then click the pencil icon to see the details which will show the database name
  • If you didn’t install it that way, you’ll have to find the Suitecrm directory in file manager, go into the directory, and then click the ‘view’ button after selecting the config.php file. Scroll down until you see a block that looks like this which will expose your info:

array (
‘db_host_name’ => ‘localhost’,
‘db_host_instance’ => ‘SQLEXPRESS’,
‘db_user_name’ => ‘yourdatabaseNAMEwillbehere’,
‘db_password’ => ‘randomPASSWORDwillbehere’,
‘db_name’ => ‘yourdatabaseUSERNAMEwillbehere’,
‘db_type’ => ‘mysql’,
‘db_port’ => ”,
‘db_manager’ => ‘MysqliManager’,

Now you have your database file safely saved on your machine as well as a backup of your suitecrm. Nice work.

Step 3 – Rename the Index file.

In your file manager navigate to this spot:

(yes, that’s a lot of indexes!)

Inside this is, no surprise, another index folder! But this is the one we want. Double click on the text and re-name it to ‘index.backup’ from it’s current ‘index’. Just so you know what’s going to happen here is the system will go looking for ‘index’ but because you just renamed it it won’t find it and will create a new one (which is a trick, because that’s what we want, you trickster!). At the same time you’re backing up the old one so bonus.

And that’s it for the work you need to do in your file manager for now.

Step 4 – Stop your Cron Jobs if You Have Them Started (which I’m thinking you do…)

If your Suitecrm is doing workflow stuff and sending alerts, probably your cron jobs are setup so you already know what a cron job is. If not, back up your current cron setting so you can quickly get it up and running again. I just saved this in in a safe place in a text file to use again after completing this stuff.

  • a) go to Cron Jobs in cpanel
  • b) copy and paste the settings you have into the text file and save it safely somewhere
  • c) delete the cron job This makes sure the cron job won’t run while you are doing the next steps. I went a step further, ( not sure if it’s needed ) and changed all my scheduled events in admin/schedules to ‘inactive’ to assure that I could turn them on one at a time later after I turned this on again. I think this was a good move so I’ll advise it next:

Step 5 – Turn all your scheduled jobs in Suite CRM Scheduler to ‘Inactive’

See comments just above.

## Do the Database Work
Ok, now we’re ready to do the stuff that was totally foreign to me but pretty fast and easy once you know how. Go into ‘Phpmyadmin’ section of Cpanel to begin.

Delete Rows from Table aod_index

This one is pretty easy. just find it on the left

… and click it then click the red delete circle and say yes to delete (or was it ‘go’? whatever, you’ll know…)

Delete Rows from aod_indexevent

This next step requires getting rid of WAAAAY too many rows to do by a human. Trust me, I tried before I was forced to find this better and faster way.

This one is a bit more ‘cryptic’ since you have to write a code. But the neat part is yiou know you are doing it right because it auto-fills as you type it.

  • a) go to SQL tab at the top of your Phpmyadmin
  • b) highlight and delete whatever is in that big white query box at the top if there is anything
  • c) Start typing this command and use the tab key (for fun) to autofill when it pops up stuff:

truncate aod_indexevent

  • c) press ‘go’ on the far right
  • d) agree when the warning Do you really want to execute “TRUNCATE aod_indexevent”? comes up

Boom. Done. Now we have to turn everything back on.

Step 6 – Turn Everything Back On

  • 1. your cron job
  • 2. your schedulers in admin, but see note below

Final Notes

There are two important admin schedulers related to your searches which need to index. the main one related to above which I believe broke our Global Search was the ‘Optimize AOD Index’ job. SO, for this one what I did was set it to ‘every 2 hours’ after I did the steps above. This would allow me to see an improvement sooner. Then, once I realized it was fixed, I switched it back to ‘every 14 hours’. I’m not sure what a good amount of time is but that seems to be working well for me. SO maybe you could do the same which will allow you to see if its working sooner. It seemed that by the end of the first day mine was fully working again.

Hope this tutorial helps someone as I don’t have developer skills to pay the project back

suitecrm Technology Tutorial

How to Change Default Contact List View in SuiteCRM in Account View

I love suitecrm. Freedom coding built by the community, super useful, and awesome for business.

I’m going to start logging some stuff here that will maybe save some other people time, too.

In this case, I realized today that I’m logging into my accounts page, scrolling down to ‘contacts’ and seeing absolutely nothing useful except an email address.  The default stuff doesn’t seem very good so I’m changing to:

  • name, office line, mobile, position/title, and email

That’s way more useful.  Surprisingly, it was very hard for me to figure out how to do this and I had to actually look at the code.  Good news is that it’s *crazy* easy once you  know where to find stuff.  Here we go:

  1. go to admin
  2. go to studio
  3. go to accounts module
  4. go to subpanels
  5. go to contacts
  6. drag and drop what you don’t want out and drag in what you want and in the order you want it
  7. click ‘save and deploy’


Hope that helps!