• How to Integrate Salesforce with Google Translate

    Introduction In this article, we will show you how to integrate Salesforce with Google Translate. You will learn how to translate text in Salesforce using a Lightning Web Component and the Google Translation API.  Here’s a sample of what we will be developing. You might think of looking for a package on the AppExchange, but […]

  • 3 New Awesome Salesforce Reporting Features

    Introduction In the Spring’20 release Salesforce finally heard our prayers and provided the ability to: Declare Row Level Formulas. Filter reports using Field to Field comparison (Generally Available). Count unique values in report results (Generally Available). This blog’s goal is to review each one of this new, AWESOME!, features and take a look at some […]

  • Test data creation in Salesforce using Builder Pattern

    The Builder Pattern is a software design pattern intended to add more abstraction to the instantiation of Objects, where you can preset certain steps of the process simply by, setting some properties with default values coherent with the context of the execution. Say you have a Custom Object with several required fields, but you need […]

  • Regular expressions in Atom for code consistency

    When we start working in a project that was previously developed by another company, we could fall in the disgrace that the code was written by more than one developer without agreeing in the same practices, something that we can fix with some regular expressions (regex) within Atom. In the examples below I decided how the code should looks like […]

  • Salesforce-Python, Install Beatbox

    Salesforce-Python: Parsing xml files from SF using Python

    Salesforce-Python Problem: Two weeks ago or maybe more our clients from California requested a script to parse a xml file (Salesforce-Python). After parsing the xml we had to get some data from it and update some Salesforce records using that data. Salesforce-Python: Why Python? Python is a short syntax language (fast coding). We didn’t have to […]

  • Automating Your Daily Git Tasks

    Automating Git tasks is not about hooks or aliases, that’s a story for another day.

    Let’s imagine for a second that you are a lazy person, not too lazy, but lazy enough to get a little upset every time you need to, let’s say, update your beautiful working repository or even cheat on your SEO configuration by mentioning ‘Automating’ out of nowhere (see what I did here?). You can’t mess it up, because you and your team are so proud of the beautiful branching model you achieved and you treat merge commits as if they were bitten by a zombie.

    Git commands to preserve logging readability are one of the complications that requires you to try automating those commands

    BTW, this beautiful console is ConEmu, check it out.



    But, of course, to achieve that ‘Good Practices of the Month’ badge and be delighted with the output of your git log you need to do some tricky stuff on a daily basis.



    Let’s continue with our imagination exercise, and imagine this workflow:

    • You work in a feature branch for every story
    • That branch is checked out from ‘develop’
    • All the commits created in the feature branch must be taken to ‘develop’ at the time they’re created
    • Obviously, those commits, need to be synched with the ‘upstream’ and ‘origin’ remotes
    • Once that feature branch is done it is merged with a third one, ‘staging’, ‘qa’, ‘release’, whatever
    • You hate, absolutely hate, merge commits


    So, that comes with some tricky implications: if you don’t want merges in your ‘develop’ branch, and don’t want to get the ‘develop’ commits to the feature  (since they might have zero relation with your work) you’ll need to git rebase your changes from the feature to ‘develop’ instead of just merging it.


    That means, for example, we need to:


    That’s four commands every time you want to get the latest changes.

    Remember: You are lazy.


    But wait! There’s hope, because, in case you didn’t notice: git is awesome.


    So, here’s the thing, git has this awesome feature, where you can write a script, add it to your PATH and make git to run it. Just like that.

    First, you need a file named ‘git-whatever’ it doesn’t need an extension, and must be named with the ‘git-’ prefix.

    I recommend to place it inside an specific folder and add the folder to the PATH, since you may want to store many files in there.

    So, what’s inside the file? Well, it must begin with the address of the interpreter for the scripting language you’ll use. Just a hint: the git installation folder comes with an sh interpreter for free!


    #!/bin/sh // That’s the generic route for git’s own sh interpreter


    After that, you just can do whatever you want, assign variables, control the execution flow, iterate and the most important thing: set the git commands you need to run every time.


    Here’s an example for a script that helps automating the job described above, fetches the upstream remote, finds the newest common commit, resets to that point and merges from there:



    Now, all you need to do is go to your repo and ‘git whatever’.

    Happy coding!


  • Connection to MySQL through PHP with DAO

    I will try to explain to you a how DAO is a better approach to connect to MySQL through PHP, making the code readable and secure at the same time. Change our connection from mysql_connect() to new mysqli(): Imagine we have a connection.php file. Typically it looks like this:

    Instead of this we could change it into […]

  • Using Salesforce Reports & Dashboards API via Apex

    As Salesforce Administrator/DevOps, you might stumble to common situation where you have to mass-update or mass-delete specific records with complex filtering criteria and deep Salesforce object relationship (parent, child, or grand child). Of course,  if you are an expert in Apex programming, you could write long and complex nested SOQL queries to get the record […]