Gorav Seth

Salesforce MVP | Permaculture designer

Read this first

Creating a Global Picklist with custom API values

Global picklists are great. As is the ability to customize the API names separately from the label. But while you can create picklist values via copy/paste, you have to update the API values individually.

For small picklists its not that hard to do manually, but for large ones, there is another, better, way.

  1. create a temporary global value set via the UI
  2. retrieve it using workbench
  3. set the values in the xml
  4. insert the picklist via workbench

alternatively you could create the entire xml file manually and skip step 1 and 2, but that part is so easy via the ui that you might as well do so.

step 1 is covered in help and training

for step 2, this doc, has the info for the package.xml file you need (also copied below) and this article has a step by step for the retrieve process - just note you would use the package.xml as specified below.

<?xml version="1.0" encoding="UTF-8"?>

Continue reading →


Spring 18 Release

02-15-2018

Notes for DCNPUG Spring 18 Release Review from sales cloud user / admin perspective

overall

  • flows are getting love
  • more parity / functionality for reports / dashboards in lightning
  • a lot of customization in lightning
  • strong productivity enhancements in lightning
  • some great new formula functions!!!

resources

  • Release site has downloadable release overview pdf and lots of highlights
  • Release readiness live videos
  • Release Readiness Group on Trailblazer Community has lots of info and a new release ppt deck every release
  • Release notes
  • Release Demo Webinar - new? Just joined today and it was AWESOME, never have seen this before - high speed, lots of demos, little else. Highly recommended.

new functionality (classic + lightning) and feature

  • flow - lightning components, override header and footer, stages, upload files, launch from object specific action
  • lightning

Continue reading →


Displaying a comma/semicolon separated list of emails

I’m doing this on a custom object, odds are you will want this on campaign member. So where you see ‘worker’, use ‘campaign member’.

4 steps

  1. lookup the records and add to sObject collection
  2. loop through them
  3. use an assignment element to add the loop variable email to a text variable
  4. display the text variable in a screen

overview_1.png

most of the magic happens in the assignment element, where i add the email to a text variable with a semicolon, and use a constant to add a line break

assignment element
assignment_1.png

constant
constant.png

and here is the result

result_email.png

If you want to get fancy and let users select records from a list view and only export those, you can do that using the approach illustrated by Sir Andrew Fawcett here : https://andyinthecloud.com/2014/06/04/more-power-to-your-flows-in-summer14/

Continue reading →


NPSP Primary Contact Related List Label Override

on a post on the pub inquiring on how to view campaign members who have not donated to a given campaign, i noticed that one could not properly cross filter contacts against opportunities with the NPSP enabled, because there are TWO opportunity objects to select from.

twoOpps.png

one is the standard opportunity contact role relationship between contact and opportunity, while the other comes from the primary contact lookup on opportunity - but there is no way to tell them apart.

I believe these are kept in sync by the npsp, based on the primary checkbox on contact role, so the results may be similar - but if there are multiple contact roles on an opp the standard relationship would show ALL of them, as there is no way to filter only for the primary contact, while the custom relationship would only show the primary contact. So either way you need to know which one you are choosing!

So, enough of

Continue reading →


Its 2018

Welcome to 2018 yall. There was a recent post on the hub that got me thinking about my long running list of random stuff that as far as i know you still cant do in salesforce, even in the year 2018.

So here they are, in no particular order. Some of these may be fixed in lightning already, which i will find out later this year when we launch!

  1. you cant remove the submit for approval button from the approval history related list. especially considering that you can now submit for approval via flow and process builder now, admins need to be able to remove the standard button. idea : 5120 points, 10 years old, ‘under consideration’

  2. the lack of a description field on public groups. public groups are used literally everywhere, and there is no easy way to extract the info on where they are used. i’ll take 255 characters, anything at all really, please? idea : 11 years old, 1550

Continue reading →


Setting flow finish behavior without a custom controller

Until now, in order to redirect the user to a record created in a flow, you needed to embed the flow in a visualforce page, and use a custom apex controller to get the record Id from the flow so you can use pass it to a pagereference method and direct the user to the record.

This meant that you could not use lightning runtime (as flows embedded on visualforce pages will only use classic runtime) and that you needed to write up a custom controller.

No longer! With winter18, you can use the lightning flow component on a visualforce page - and that component automatically has access to flow variables via the outputVariables variable/property. (i have very limited js knowledge so please share the correct terminology).

Start with the sample code on developerforce.

It has a couple of issues and will not work as written, but a fine fellow who goes by Charles T on sfse guided me to a

Continue reading →


My FormAssembly wish list

I am a big fan of formAssembly, primarily from the angle of a Salesforce administrator of a complex org. I’m maintaining a running list here of issues and functionality that I hope to see added.

GENERAL

  • provide connector level skip logic on all connectors
    • allows for much better management of updates to live forms as can have test-only connectors that are activated by a URL parameter

FORM BUILDER

  • provide built-in functionality for discount codes and scholarships
    • using client side js is easily hacked
    • scholarships (100% discount) require are very poorly supported and require a ton of work
  • add a ranking question type (a list of options that can be dragged into order)

SALESFORCE CONNECTOR

  • prefill picklist or autosuggest form field from a salesforce object
  • get contact’s account ID and use in dependent steps
    • needed in opportunity creation and for adding new contacts to an

Continue reading →


Use flow in Chatter profile tab to update user fields

I needed a ‘simple’ way for users to view and update two custom fields on their user record. Visual workflow or visualforce are easy enough for this type of stuff but need a custom tab or a link in order to pass in the running user Id to the page / launch the flow.

I like Chatter subtab apps / profile tabs for this use case, as they allow you to group functionality that is relevant to the running user, in a clean way that doesn’t add yet another tab to the mix.

However, when using a visualforce tab in a profile tab, you can easily display running user data using the $User global variable, but you need a controller extension in order to update data because you have no way to pass in the running user’s Id to the page’s standard Id parameter. And i wanted something simple, which for me means no apex code.

So, I did a lot of digging to find a simple way to do this, and found the

Continue reading →


Manipulating text in flows

i occasionally need to iterate over a list of records in a sObject collection, and display values from the records in a screen.

back in the day i got some crucial help from salesforce yoda / mark ross on this developerforce post, which pointed at the approach.

use a text variable to store the final concatenated text for display.
call it : vaFinalText

use a loop to iterate over your collection. in the loop, use an assignment element with a text template that references the loop variable to add data to the final text variable
call it : ttLoopText

and use a constant, with a value of < br /> to add line breaks between each loop (which i cribbed, probably from this post)

this approach of using the <br /> in a constant works fine in many cases, but not in email, as flow emails are strictly plain text, so the <br /> comes through exactly as entered.

test_BR.png

i had seen some solutions for this

Continue reading →


DCNPUG Summer17 Release Overview

Release Notes : https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/salesforce_release_notes.htm

Notable Features : Tried to focus on end users in classic, but a bit of dev and lightning only stuff in here too.

Salesforce Optimizer : Summer 17 covers more ground (apex, vf, limits, chatter usage, salesforce 1) than Spring. Optimizer is pretty sweet. If you haven’t tried it out yet give it a shot.

Search for opps using account name

Duplicate Management : lead-contact matching Duplicate management is pretty sweet. Try it out. Note - doesnt play nice with flows (yet).

App to convert attachments to files Files are better. But you probably didnt want to leave the old attachments behind, and now you dont have to.

campaigns

add to campaign button on custom report types

see which campaigns accounts are responding to lightning only & requires customizable

Continue reading →