.ultrageek. Computers, Music, and Thoughts


Silly Admin Trick: Enable Service Contracts

Should be straight forward...to enable Service Contracts you have to "Enable Entitlement Management"

...why is this so hard to google.


Wave / EA: Counting the number of weeks, months, days, etc. in SAQL

This was for some reason harder than it should have been. Needed to create the number of weeks from the beginning of the year to today. Re-posting this really because there are not a lot of examples out on the web.

date_diff("week",toDate("2018-01-01","yyyy-MM-dd"), now()) as 'YearlyGoal'

I will go back later to make the start of the year to be dynamic but for now this will do. Also watch out for this quote: “ instead of " in the examples. It will total throw an error that will point you in the wrong direction.

Love Wave and EA but wish their community was more open like StackExchange, searching is dreadful and requires a login but this was the article that I used to troubleshoot: https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009MBPCA2&fId=0D53A00003dGrNGSA0


Tagged as: , No Comments

Clicking Link in Email Opens Blank Chrome Tab

Restart Chrome...it has an update that has been applied. Click Help -> About to validate but this issue drove me nuts and since I work on a Mac that only needs rebooting when the VPN crashes (1-4 weeks) I was periodically suffering through this one. It is amazing how long you can deal with a problem until you finally have had enough and google it.

Filed under: Knowledge, Stupid No Comments

Salesforce.com Icons

No school like the old school. A quick way to give quick visual feedback in the Classic Salesforce.com UI is to use the built-in icons in conjunction with a formula field. A source that I have used forever seems to work and then not work so I found another URL that seems to work:

Does not work - look below for working links: http://blogforce9dev-developer-edition.ap1.force.com/salesforceicons

Basic Formula I used recently to let the user know that the future class had not updated the page with Approval Updates (Status/Step):

if(Update_Status_Text__c = "Future",
/* Page has not been updated by the future class */
IMAGE("/img/msg_icons/error16.png", "Refresh!") &
" Refresh Page",
/* All Good! */
IMAGE("/img/msg_icons/confirm16.png", "All Good!") &
" Page Good!"

This is the original page I've used for years (No Longer Works): http://www.force2b.net/index.php/2010/08/salesforce-icons/

Update (Mar 2019): And yet another good site: http://www.vermanshul.com/2017/10/quick-tips-salesforce-default-images.html

Update (Feb 2018): Here's another good site: http://salesforce-stuff.blogspot.com/2012/01/salesforce-images.html

Tagged as: , No Comments

Adding New Opportunity Record Type to Wave Sales App

We created a new Opportunity Type over the weekend and I assumed that it would just magically get added to the Opportunity dataset that the default Wave Sales App builds out but no, the dataflow/dataset was missing all the records related to the new record type. Creating a new dataset showed the data so I knew it was the dataflow somehow.

This is a braindead post to remind folks that if you create a new Opportunity record type and use the Salesforce.com default Wave App that you have to go in and update the dataflow JSON in about 4 places depending on the options you picked when you created the App.

These are the nodes:

  • Opportunity_Custom_Filter_Flag
  • Activity_Custom_Filter_Flag
  • Pipeline_Trending_Custom_Filter_Flag
  • Opportunity_Products_Custom_Filter_Flag

I recommend just downloading and updating the sections using a JSON editor like this one.


Silly Admin Trick: Extracting Names and Emails from Groups and Permission Sets

Filed away in the "Why is this so hard?", extracting a list of users related to a Public Group, Queue, or Permission Set in Salesforce.com is harder than it should be. Not in reporting and a pain with Dataloader and XLS. There are lots of workarounds and methods for doing this but it should be easy!

So here's another workaround using public group as the example:

  1. Get the ID of the Group
  2. Fire up Workbench (https://workbench.developerforce.com/login.php)
  3. Queries drop down --> SOQL Queries
  4. Pick User to see the list of fields for reference
  5. Put the following in Notepad or whatever you use for scratch
  6. SELECT Name, FirstName, LastName, Business_Unit__c,Title, EMAIL FROM USER WHERE IsActive = TRUE AND ID IN (SELECT UserOrGroupId FROM GroupMember WHERE GroupId = 'Group_ID')
  7. If you get an error make sure your single quotes are not apostrophe's, Evernote loves to switch those on you without asking.
  8. Under 'View As' select Bulk CSV so you can easily download/export the entire list

Nothing to interesting but doing the SOQL join can be tricky, left inner join for those keeping score.


Fixing Salesforce.com Developer Console Jerking Back Up or Snapping Back

A strange issue I have had with Salesforce.com Developer Console on Chrome for a couple of (don't laugh) a couple of months is that as I scroll down the page will jerk back up to the previous page. In scanning altslash.org I saw this headline:

Chrome Now Uses Scroll Anchoring To Prevent Those Annoying Page Jumps

Ok, so fast forward through the usual blah blah blah. I disabled this in chrome (chrome://flags/#enable-scroll-anchoring) and either this issue got fixed or this setting fixed the issue I was having with the page jerking back or snapping back anytime I scrolled rapidly down the an apex class. Console is basically a streaming app that is constantly updating and listening for changes so it doesn't surprise me that it was impacted by this but what was so frustrating was that I just could not find anything on the Internets to point me in the direction of how to fix or even identify the problem until just now. Happy Days!

The work around in case someone has this issue is to not scroll with your mouse in the middle of the page but instead to position your mouse on right where the scroll bars are and the system will allow you to scroll with out snapping back to the previous page.


Data Loader Error Message Fix: Failed to parse detail

If you have gotten the following message:

Failed to parse detail: START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL>... @1:752 due to: com.sforce.ws.ConnectionException: unable to find end tag at: START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL> ... @1:752

Or something like that while trying to load in to Salesforce.com Data Loader, try upgrading your version. I had 35.00 and 37.00 both fail where a fresh copy of 38.00 worked.

Click the image below for fullsize:

Screen Shot 2016-10-20 at 12.16.28 PM


Silly Admin Trick: Avoid Tables going across Page Break

When doing PDF's in Salesforce.com one thing that can be tricky is dynamic content caught between the page break. Signature block being a good example of something that you want kept together on the page. Using the CSS 'page-break-inside' can work 100% the first time or if you have a busy page with lots of formatting and CSS you might run in to issues especially when using 'renderas=pdf' as your HTML and CSS are rendered on the backend and not using your latest/greatest browser. At least that was what I found when my CSS worked great in Chrome and IE but bombed when doing a download/renderas=PDF.

One solution I found that worked 100% is wrapping your table in question in an apex:outputpanel like so:

<apex:outputPanel layout="block" style="page-break-inside: avoid;">

I would like to take credit for this but as usual this was a google find: https://developer.salesforce.com/forums/?id=906F0000000AjSfIAK


Silly Admin Trick: Date Formats without adding Zula Time

Microsoft Excel...it loves to format dates in a crazy way. By default it will do day dash 3 digit month name and 2 digit year like this: 13-Sep-2016. Not helpful. In the U.S. your first instinct would be to change it to 2-digit day dash 2-digit month dash 2 or 4-digit year: 10/13/2016. Salesforce.com does not like either date. Googling 'Date: invalid date' might lead you down the path of adding time to your date...don't do it! Even for Date/Time fields if you don't have a specific time already do the following...

Solution: Take your dates and do a custom format using the following: yyyy-mm-dd