Feline Flock Blog: cloud architecture/development and AI
-
Interesting Challenges in Salesforce Troubleshooting
This is a list of troubleshooting/development short stories that I’ve found interesting. They were collected in about a month of consulting done on the Salesforce platform. Not all of them were developed by me but I’ve been involved in troubleshooting each one. Some of the items are not issues but just reminders (“oh, yes, that…
-
How to create an US Map Lightning Web Component
I’ve been exploring the possibilities of using events to send data between Lightning components to keep them as generic and configurable as possible. This map component was designed to highlight and show data for individual US states. The example below shows how the map can be configured on a Lightning page. As I tab out…
-
An easier way to make VisualForce tables mobile friendly
The default behavior of VisualForce tables (apex:pageBlockTable and apex:dataTable) is static – they don’t rearrange the data to better fit tablets and smartphones. This example shows how tiny the table data can appear on an IPhone. Sometimes the table will not decrease in size and will require the user to scroll sideways to see all…
-
How to quickly copy production data for testing
Salesforce CLI has command options to export/import data hierarchically. For example, you can export a few accounts plus their respective opportunities in a tree structure and import them that way without having to manually rewire them with the new IDs in the target org. Here are 4 SFDX commands you can run on Terminal/Command prompt…
-
How to Create Charts using SVG and VisualForce
VisualForce is used to generate HTML pages but it can also create other kinds of presentation. One common alternative is to render VisualForce as PDF. This article proposes a third type of presentation that can be generated via VisualForce: images. Scalable Vector Graphics is a graphics format that uses a markup language to describe the…
-
How to Connect to Salesforce from a Python/Jupyter Notebook
It might be useful to extract data from Salesforce directly into Python and manipulate the data as a Pandas dataframe. First, you need to create a Connected App in Salesforce and copy the consumer key and consumer secret. Then start your Jupyter Notebook and create a Python notebook. Start coding your Python notebook as follows:…
-
Unlock ‘All or Nothing’ Validation Rules in Salesforce
This week someone asked me to help with an interesting Salesforce validation rule that, in plain terms, meant “Either enter these 3 fields or leave all 3 fields blank”. That is a type of XOR operation: an Exclusive OR. A logical operation between 2 or more conditions in which either all operands are false or…
-
Genius Simple Trick to Eliminate Repeated Spaces in Salesforce Formulas
Neat trick that can be used in Salesforce formulas. It converts multiple spaces between words into a single space. This kind of cleaning would usually be done in Apex. The ~ and ^ could be any character but these were preferred because they are the least used in normal text and can still be typed.…
-
How to get a lead assigned to a random person in Salesforce
There isn’t a function to get a random number in the context of Salesforce formulas. The only way I know of is to base it on time. Specifically, the seconds part of the time. If you create a formula with the expression below, you will get a random number (*) between 0 and 59, which…
-
Quick Guide to Stunning 3D Buttons using SVG VisualForce
This article gives an example of how to use an SVG VisualForce page to generate images for buttons. The button is a formula that uses HYPERLINK() and IMAGE() functions that link to a VisualForce page passing parameters color and text. HYPERLINK( “/” + Id + “/e” , IMAGE( “/apex/ButtonImage?color=” + CASE( TEXT( Industry ), ‘Retail’, ‘darkgreen’,…
Got any recommendations?