Salesforce Lightning and the missing Chatter

Here’s another weird issue in transitioning to the Lightning user interface in Salesforce.

One of our users who regularly adds Chatter posts to records in the system, reported that they were unable to post a new Chatter thread against a record. On checking I likewise found that on the Chatter tab there was a bold invitation to “Collaborate here! Here’s where you start talking with your colleagues about this record.” But there was no way to actually post a message!

The issue turned out to lie with the Global Publisher Layout, which defines the actions that will be available for Chatter. From Setup search for “publisher”, click on “Publisher Layouts” and then edit the “Global Publisher Layout”

The “Classic Publisher” section defines what chatter actions will be available in the classic interface, and if no overrides are made in the “Lightning Experience Actions” section, then the Lightning interface should inherit the settings from the “Classic” section. However I found that it wasn’t until I saved the layout (without even making any changes) that the Chatter actions appeared in Lightning.

After clicking on “Quick Save”, the “Post”, “Poll” and “Question” actions appeared in the Chatter tab in the Lightning experience.

Salesforce Streaming API issue in Lightning

This post documents an obscure issue I discovered relating to the Salesforce Streaming API after switching to the new Lightning user interface.

For several years now at work we’ve had an integration that uses the Salesforce Streaming API to sync customer and contact information from Salesforce to an on-premise system. Recently after some users transitioned to the new Lightning user interface, the integration stopped working.

On investigation, it turned out to be related to field permissions. One of the fields configured in the PushTopic was a formula field. The permissions on this formula field were set to make it readable by only Administrators and the Integration user.

  • When using the Salesforce classic interface, if another user (who did not have read permission on the formula field) updated a record, the formula field value appeared in the streaming event
  • When using the Lightning interface, if another user (who did not have read permission on the formula field) updated a record, the formula field value did not appear in the streaming event.

As this formula field was a required value in our integration, the fact that it was missing caused the integration to break.  The simple solution was to make this formula field readable by all users.

In summary, there seems to be a subtle change in the behaviour of the Streaming API between Classic and Lightning interfaces. The following is not an authoritative statement, but from my testing it appears that …

  • In the Classic interface, the fields available in the streaming event are determined by the permissions of the user subscribing to the PushTopic channel.
  • In Lightning, the fields available in the streaming event are determined by the permissions of the user generating the event.

The zombie Salesforce Flow

This week at work I struggled with a Salesforce Flow that I was trying to delete, but couldn’t. It seemed to be a bit of a ‘zombie’ Flow, that was a little bit alive and a little bit dead.  It all made sense in the end, but when I was in the middle of it all, it seemed inexplicable.

It started with a custom field that our company had added some time ago, which was no longer needed and I wanted to delete. On trying to delete the system wouldn’t let me, saying that it was in use by a Flow. I clicked on the “Where is this used?” button which identified that the field was referenced in a flow.

Clicking on the hyper link to the Flow, opened it in the Flow Builder, but that interface does not allow any way for the the Flow to be deleted.

So I went to the Setup interface,  to the Flows menu item to delete it. But although the Flow clearly existed (I had it open in Flow Builder a moment ago) it wasn’t appearing in the “All Flows” list for me to delete.

Next, I thought I’d try to delete this zombie flow by using a metadata deployment. I use the Gearset tool for deployments, and by comparing a sandbox Org without the Flow to the one that had the Flow I generated a ‘delete’ type deployment  … which then failed with the unhelpful error message “Insufficient access rights on cross-reference id”.

Eventually I figured out that the Flow couldn’t be deleted because it was referenced from a Process Builder. When I had located and deleted that Process Builder the ‘zombie’ Flow disappeared, and I was then able to delete the custom field. What made things tricky was that it wasn’t the latest active version of the Process Builder that referenced the Flow, but an earlier inactive version, so I had to search through all the earlier versions to identify the one that needed to be deleted.

The bottom line is that Salesforce won’t let you delete something that is referenced by some other design element. That’s a good thing. But the bad thing is that it can sometimes be hard (and non-obvious) finding what exactly is referencing the element you’re trying to delete.

External drive backup performance

This post is mostly a reminder to myself for the next time I need to do this …

For backing up files on my laptop running Window 10, I have an external USB hard drive permanently plugged in to my docking station at work. I then have backup software that runs backup jobs at scheduled times during the week. Recently I needed to upgrade to a larger capacity hard drive. With the purchase of a new hard drive, I also decided it was an opportune time to start using Microsoft’s BitLocker to encrypt the backed up files.

After plugging in the new drive and setting up BitLocker, I found that the backup performance was woeful. Backup jobs that used to take a few minutes were now taking hours. After a bit of experimentation and research, I found that the performance issue was nothing to do with BitLocker, but simply that I needed to enable write caching on the external drive.

The steps to achieve this were:

  • Open Windows Device Manager.
  • Locate the external drive in the list, right click and choose Properties.
  • Click on the Policies tab.
  • Change from the “Quick removal (default)” setting to the “Better performance” setting, to enable the write cache.

After doing this, backup jobs now ran in the same small amount of time as when I used the previous drive.

App failure

As a software developer I well know that software and information systems can have bugs. But it still astonishes me when software from big companies that is being used thousands of times each day across the world has egregious errors.

For example, look at this screenshot from the Malaysian Airlines iPhone app, where the top of the screen has a prominent and scary message about there being no e-mail address provided, while the bottom of the screen has a notification that an e-mail has just been sent to the address which is supposedly not available. And yes, an e-mail was received.

 

Salesforce Summer ’19 issue with ADFS single sign on

This is a work related techie blog post for the benefit of others who may experience the same problem.

We have a production Salesforce Org and a number of sandbox Orgs, all set up with a Salesforce “My Domain” and configured to use Single Sign On authenticating against Microsoft ADFS. On the weekend, after our sandbox Orgs got upgraded to the Summer ’19 release, we were unable to login to any of our sandboxes using Single Sign On. We were just getting a very unhelpful “An error occurred” message on the sign-in screen.

Comparing the Single Sign On settings in our Production Org (which was still working), I noticed that where the “Login URL” SAML endpoint used to have an “so=OrgID” parameter, this was now gone in the updated sandboxes. Jumping on to our ADFS management console, and editing the relevant Relying Party Trust to remove the “so=OrgID” parameter from the Endpoint was all that was needed to fix the problem.

Curiously, when I checked the release notes for the Summer ’19 update (which is 480 pages long!), there appears to be no mention of this change in Single Sign In configuration.

Production (not yet updated to Summer ’19) had an “so=” parameter in the Login URL SAML endpoint
Sandboxes that had been updated to Summer ’19 release did not have the “so=” parameter in the Login URL SAML endpoint
Removing the “so=OrgID” parameter in the ADFS settings fixed the sign in problem.

Accusurance

I have a grand (and probably unattainable) dream of inventing a word that will make its way into widespread usage in the English speaking world. I’ve tried with “unvaporia”, “shufflendipity”, “unprivacy”, “undergommed”, “disagreeaphobia”, “eco-busted”, “optionitis”, and “misambulist”.

I’m now having a try with …

accusurance. noun. A word or phrase that can either be an accusation or a reassurance, depending on the tone of voice you use.

As an example, in Microsoft SharePoint 2013 and later, if you initiate an action that doesn’t complete immediately you get told that the system is “Working on it …” along with the reassuring message that “This shouldn’t take long.”

Usually it doesn’t take long, but sometimes it does. Sometimes it drags on interminably, and leads to an accusatory response by the user of “This shouldn’t take long!”


Another example of accusurance is the phrase “nice one”, which can either mean a reassuring and gentle expression of appreciation, or a sarcastic accusation of having f***ed up.

Firefox 41 and the New Tab override

firefoxFor years Firefox has been my preferred browser. When I open a new tab I like to have it open to a custom page on my local drive rather than the standard Firefox new tab page. I was able to configure this using the “browser.newtab.url” setting available in the “about:config” page.

As of today, with the release of Firefox version 41, for security reasons this setting is no longer supported. Fortunately there is a New Tab Override add-on that can be installed to provide the same facility.