Salesforce Poker Run

I’ve been brushing up on my Salesforce developer skills by creating a Lightning Web Component called “Salesforce Poker Run”. The idea is that an org’s users receive poker cards as they score a new sale or complete tasks. At the end of a game the winning hand gets a prize set by the admin. The game adds a bit of fun to mundane Salesforce data entry. Here’s a preview screenshot of my current beta. I still have some testing and graphic design to hash out. Stay tuned!

Salesforce Auto Relate Email Message Attachment

The Salesforce Lightning plugin for Outlook allows logging emails directly into Salesforce. However, workflow or process builder cannot trigger events on these logged emails (vote for that feature here [Salesforce Ideas]).

By default all logged email file attachments are related to the EmailMessage object that is created by the plugin. The EmailMessage can be related to any object via the plugin; however, the plugin does not allow the file attachment to also be related to an object. In fact, the share button on a file detail page only allows sharing to a group or person – not an object. Here’s the trigger to circumvent that restriction.

Continue reading Salesforce Auto Relate Email Message Attachment

Salesforce Add Action To apex:EnhancedList

There’s no quick way to add actions to a Salesforce VisualForce page with an EnhancedList. Here’s the workaround.

<apex:page>
    <script type="text/javascript">    
    function endsWith(str, suffix) {
        return str.indexOf(suffix, str.length - suffix.length) !== -1;
    }
    function setActions() {        
        Ext.ComponentMgr.all.each( function(item, index, length) {
            if(endsWith(item.id, "grid")) {        
                var store = item.store;                    
                item.store.each( function(record) {
                    record.set("ACTION_COLUMN", ["My Action"]);
                });
            }
        });
    }
    </script>
    <apex:enhancedList type="Systems__c" height="300" oncomplete="setActions();" />
</apex:page>

Salesforce uses the Extjs framework (Sencha.com) to implement list views. All user interface components on an Extjs page are registered with a component manager. The code accesses the component manager, looks for a component whose id corresponds to a grid (our EnhancedList), and then changes the action items in the store associated with the grid.

Salesforce Group Tables with Conga Composer

For a recent client project working with the Salesforce.com platform I used Conga Composer to create custom quotes. The client is an engineering firm and one of the quotes required employee hours billed under dynamic categories. The quote needed each employee’s hours listed under the associated category.

Here’s how to create the quote.

1. Create a report table in Salesforce using the schema builder. Give the table 10 or so text columns, and an identifier column that will store the object id of the associated Salesforce Opportunity object (i.e. a key in normal database nomenclature).

2. Create a hours master-detail object in Salesforce using the schema builder. In my example each hours billed will be grouped by a project role and part.

3. Create an APEX trigger that will fill the report table each time an hours item is added to our opportunity. I keep my APEX logic code in individual classes with a single APEX trigger – this keeps everything clean and easy to debug if you have multiple APEX triggers that are order dependent.

Continue reading Salesforce Group Tables with Conga Composer

Salesforce Custom Hours Billed Quote with Conga Composer

For a recent client project working with the Salesforce.com platform I used Conga Composer to create custom quotes. The client is an engineering firm and one of the quotes required employee hours billed under dynamic categories. The quote needed each employee’s hours listed under the associated category.

Here’s how to create the quote.

Continue reading Salesforce Custom Hours Billed Quote with Conga Composer

Salesforce.com Data Download via Java Swing, RSSBus JDBC Driver, and Apache Commons Daemon

I recently developed an application that synchronizes Salesforce.com data to a local PC. The application is developed in Java using the Swing graphical framework and uses a Salesforce.com JDBC driver provided by RSSBus. The application stores Salesforce.com credentials and synchronization interval timing data in a Java properties file. The application allows non-graphical execution via the “nogui” command argument. I also include an Apache Commons Daemon class and script that allows running the application as a service.

Continue reading Salesforce.com Data Download via Java Swing, RSSBus JDBC Driver, and Apache Commons Daemon

Developers and Side Projects

There’s a great article on Medium about Developer ADHD. The author explains why some developers have lots of unfinished side projects. Like the author I too have several unfinished side projects. I find I usually will give up on a side project after I’ve fully learned the underlying technology. Here’s the rundown of a few of these projects.

  1. Autodesk Revit PDF Printouts
    This app was actually the idea of one of my clients that I created during a lull in work. I tried a Kickstarter project to get funding but was unsuccessful so abandoned the project. There was a working demo that printed PDF drawings from Revit that were interlinked. Everything coded in C#.
    Revit1
    Revit2
    Revit3
  2. Business Foot Traffic Social Media Statistics
    I had the grand idea of tracking Facebook and Foursquare usage at a place of business. Unfortunately, Foursquare fell out of favor and I never finished the demo.

    Foursquare1
    Foursquare2

  3. World Newspaper App
    I did this demo almost 10 years ago when Extjs was the rage and YUI was still relevant. Its a map of the world with clickable newspaper icons that pulled in a RSS feed.

    Menkyo1
    Menkyo2

  4. Law School Notes AppInstead of paying attention during classes in law school I created this app in Extjs to automate note taking.

    notes1
    notes2