using screen multi-select choice in formula uses label not value
sorry the images turned out huge and this article is hard to read
sorry the images turned out huge and this article is hard to read
Email to case matches on all email fields, including custom email fields.
However, if email to case finds a matching contact, the auto-response email appears to always include the contact’s preferred email, which is problematic if one thinks about it for a few nanoseconds. Contact submits a case from email abc and the autoresponse is sent to email xyz (and also email abc, if you check the box to copy all email addresses on the autoresponse).
There is now an easy declarative way to remove the contact from the case, using before-save flows, which fires before the auto-response rule!
The flow needs to set case.contactId and case.preferredEmail to blank (global constant empty string). I assume both are required, did not test them independently.
i just spent an hour trying to get an import file working, because translation workbench…
the documentation ON THE IMPORT PAGE says
Include the language attribute at the top of the file. Your format should look like Language = “en_US” and include a valid language reference.
proof:
Nice, if it was true, but its complete fabrication. It makes not a single iota of difference if it is there or not or filled with garbage.
What is required, is the following
Language code: [valid language code]
Type: [source | bilingual | data]
I spent a freaking hour trying to do shit with Language = xyz, making sure my file is utf8 etc etc etc. What garbage.
So this worked fine
Language = "dumpsterfire"
Language code: es
Type: Source
KEY LABEL
CustomLabel.FD_GAR I am a Sucker
In Summer 14, Salesforce added the isSandbox boolean field to the Organization object that can be easily queried in apex.
In flow, process builder, and workflow rules, you can access the $organization global variable via a formula field, but a number of fields are missing, including isSandbox
You might think you could hard code the org Id but it wont work, due to magical mysterious things that happen in the sandbox refresh engine, which will update almost all references to the new sandbox org id.
In flow, it is quite easy however to get this info via a get record element. Do a get records on the Organization object (all records), then you can access the isSandbox field, and evaluate it in a decision element.
Get Records
Decision Element
Sadly, this is not available for process builder or workflow rules and my idea for this only has 3 votes in two years, flow is the future…
...
Some folks needed a form that had an embedded pdf for review. I was hoping to find something that works on desktop, and works or is at least not a total disaster on mobile.
Found the pdfobject js library : https://pdfobject.com/ which seemed to know a bit about the subject. Tried all the ‘static’ / pure html approaches, and discovered the formassembly blocks the tag which otherwise worked perfectly well. Note - you can actually save a form w the object tag, but it will disappear the next time you open it. Support says they will work on blocking it better soon
So tried out the js approach, and it worked out well. Works great on desktop and displays the ‘fallback’ option to download the pdf on mobile devices that do not support embedded pdfs.
Here is how to do it
To start, create a form with two sections, and one text area in each section. Make the second section a hidden...
UPDATE : JUNE 2023
Summer22 brought us new formula functions.
UNIXTIMESTAMP allows you to convert dates to numbers, which can be fed into MAX or MIN, which will return a single value which you can convert back to dates using FROMUNIXTIME
see the list of formula functions in the docs for details
I have 3 date fields on an object and i need the MIN of the 3. But the MIN formula function does not allow dates, just numbers
IF could work for up to 3, and there are some solutions out there using formulas, but seemed fragile / complex.
So, solved via flow
create a variable, type = date; name it vaMinimumDate
use an assignment element to add all the date fields from the object to a collection variable (doesnt matter if the dates are null or not)
loop over the collection variable
in the loop, use a decision to evaluate if the current loop variable is less than vaMinimumDate
Screensh...
I managed to add a null value to a text collection, and found a way to remove it.
How did I end up with this mess?
I have a loop that splits a comma separated string, and adds each item to a text collection. This string is normally a bunch of external IDs, but I ended up with
Result{!vaCSTextToSplit} = "70140000000cokEAAQ,, master_AshokaUpdates,news_USA,"
see that extra comma in there before ‘master’ - when that ran through the split-o-matic it created a collection that had a null / blank value in it. i use blank/null intentionally here, as i really was not sure which one it was.
{!collCampaignIDs} = "[70140000000cokEAAQ,,master_AshokaUpdates,news_USA,MASTER]"
and that was causing some (silent) havoc downstream when we looped over the collection to get a campaign record filtering against that external ID. the flow would pull a random campaign that had a blank external ID...
A few days ago I asked
am i the only person who is still confused about equals globalconstant.emptystring vs isnull = true in flows? i swear i used to use equals gces all the time and it was fine or was i delusional. seems like isnull = true works most everywhere now. is there any clarity on where one might use equals globalconstant.emptystring?
It seems like a pretty simple question - how do I tell if my (X) is blank / populated.
the X could be
It seems like the answer is to use isNull, but seems like its not clearly stated as such. And a few folks agreed that this seems to have changed over...
h/t to a number of folks on this one, esp Luke Cushanick who shared the idea for this.
Marking fields used in integrations in some way, to prevent them from being deleted, might be useful. Even more useful might be to document which integrations use them, and how.
After some discussion, this can be done using a custom metadata type fairly easily. No code!
Create custom metadata type, lets name it “Integration Field”
Then add 2 fields to the metadata type to track where this is used
Integration name : type = text
Description : type = text area
Now and the magic : create two metadata relationship fields, in order
Object Name : type = metadata relationship, related to entity definition
Field Name : type = metadata relationship, related to field definition
notes:
I have built out a demo scheduled flow that sends an email to each opportunity owner with a list of open opportunities, using a visualforce email template. This flow is much like a report subscription, but with more context, and without nearly as much work of scheduling subscriptions to N users. And - no 5 subscription limit!
The basic approach is covered in this article - which was built on custom objects in our HR system.
In order to avoid hitting the flow iteration limit from building a unique collection of owner Ids (which I can do using this hackish but inefficient approach), I built an invocable apex class that takes a sobject collection and a field, and returns a unique collection of values. This could have some other interesting uses, and opens this flow up to run on up to about 1990 unique active owners, which is pretty robust by my standards…Above that value, you will...