function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thinkdatathinkdata 

How do you access a custom setting from a flow?

I need to retrieve a value from a custom setting and incorporate it as a value in a Visual Flow. But I cannot see where custom settings are exposed to the flow designer.  any help?
My use case is that I am launching a report from the flow, and best practice is to store report IDs in custom settings to facilitate deployments.
Doug
Best Answer chosen by thinkdata
thinkdatathinkdata
I figured it out: you can reference them directly in a formula.
I created a Custom Label Project_Report_Wizard_AdjustmentResult  with the ID value of my report (e.g. 00Oe0000000GGnM)
then I created a field
"ReportAdjustment"= $Label.Project_Report_Wizard_AdjustmentResult

then I created a link in a visual flow display text field: 
<A HREF="/{!ReportAdjustment}?pv0={!xDataLoadID_1}" TARGET=""><B>Show Misc Adjustments Created Report </B></A>

(fyi the {!xDataLoadID_1} parameter for the report is the batch id from the records I just created in the flow.)
bingo

All Answers

Aaron ThompsonAaron Thompson
You have one of two options.
1) House the Flow in a Visualforce page. Pull the record ID out of the flow using the flow:interview interface and assign it to a variable. Use the variable to assign the record ID to the custom setting (http://www.salesforce.com/docs/developer/pages/Content/pages_compref_flow_interview.htm).
2) Create a plugin for your flow that accesses the custom setting and assigns the record ID to the custom setting (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_plugin_using.htm).
thinkdatathinkdata
I figured it out: you can reference them directly in a formula.
I created a Custom Label Project_Report_Wizard_AdjustmentResult  with the ID value of my report (e.g. 00Oe0000000GGnM)
then I created a field
"ReportAdjustment"= $Label.Project_Report_Wizard_AdjustmentResult

then I created a link in a visual flow display text field: 
<A HREF="/{!ReportAdjustment}?pv0={!xDataLoadID_1}" TARGET=""><B>Show Misc Adjustments Created Report </B></A>

(fyi the {!xDataLoadID_1} parameter for the report is the batch id from the records I just created in the flow.)
bingo
This was selected as the best answer
thinkdatathinkdata
btw: I used the standard formula editor to get the value of the custom label variable and pasted it into the formula field in the flow
 
Doug Beltowski XDoug Beltowski X
You can do Lookups on Custom Settings the same way you would do a Lookup on a Standard or Custom Object.