Have read thru multiple post on this but not getting the results. I have a Flow formula that calculates OK using the flow native debug. However, this flow is called via apex showing the same variable in the debug logs with & #124; instead of the pipe'|' symbol.

Here is the formula: ("UPDT:"& {!fDocCodeOLD} &"|"& {!fDocCode})
Output in native Flow debugger shows:  "UPDT:529|529AR"

Adjusting the formula as: ('UPDT:' & {!fDocCodeOLD} & '\'|\'' & {!fDocCode}),
Update a record calls apex which launches the flow.
Output in the debug logs shows: UPDT:529\'|\'529AR

I am sure the syntax is off but could use some suggestions given this is a flow variable being interpreted via apex.

This is the calling apex....using a flex queue to support the use of callouts for async support.

// from calling class setting the parameteres to pass into the flex queue class.

 String docCodeCSL = "UPDT:"& oldCase.DocCode__c & "|" &  c.DocCode__c;
 as  String docCodeCSL = docCodeCSL.unescapeHtml4();
 Params.put('document_code' , docCodeCSL);

public class CaptivaQueuableCallout implements Queueable, Database.AllowsCallouts
    Map<String, Object> params = new Map<String, Object>();
    public CaptivaQueuableCallout(Map<String, Object> Params){
         this.params = Params;  
         system.debug('Constructor CDR Flow Params received in flexQueue: '+Params);   
    public void execute(QueueableContext context) {  
        system.debug('Execute CDR Flow Params for flow Interview call: '+params); 
        Flow.Interview.Case_CDR_FlowController stage = new Flow.Interview.Case_CDR_FlowController(params);      

1 Answer 1


Flows have their output HTML-encoded. Use unescapeHtml4() to get the output you expect.

  • Hi there sfdcfox. Thanks. We are building and passing the variable in flow. Apex just calls the main flow and passes a few parms. Not sure how to use unescapeHtml in the flow itself or are we saying build the string in apex using this and pas it into the flow for use as a variable ? I attached the calling apex to the topic.
    – rickmac
    Sep 25 at 19:19
  • Update. Added an additional parameter to pass into the flow from Apex using unescapeHtml4() but the debug logs still show &#124; as a ‘|’ pipe symbol. So not sure if this is even possible to maintain the '|' in the debug logs ? Updated the class above.
    – rickmac
    Sep 26 at 21:18

You must log in to answer this question.

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