0

How can I read a custom setting in Salesforce Flow. I have created a Org level Custom Setting called FeatureFlag__c with only one boolean field IsActive__c. The idea is, of the org level IsActive__c is true, run the flow else show a screen with some default message. In the flow, I have created a SObjectVariable by the name "SetFieldFeatureFlagFromCustomSetting" and reading it in the very first step of type assignment as "{!SetFieldFeatureFlagFromCustomSetting.IsActive__c"

Assign the SObjectVariable to a Local variable inside a flow

It is always coming up as null. Is should be true as the org level custom setting is set to true.

1 Answer 1

2

You created an SObject variable. This isn't what you needed. Instead, go to the Resources tab on the left palette, create a new Formula, and use the appropriate formula you're looking for (e.g. $Setup.SetFieldFeatureFlagFromCustomSetting__c.IsActive__c). Then, in your assignment area, reference the formula:

{!VariableNameToSet} equals {!FormulaNameForCustomSetting}

Or, you can use that formula directly as a criteria in a Choice. The other variable isn't necessary in this case.

1
  • Perfect! Worked like a charm. Thank you very much @sfdcfox Commented Jul 6, 2018 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .