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
StaciStaci 

Button in std object, into flow, returns to edit page of custom object

I have a button on Cases for Change Management.  When the button is clicked, it calls the following apex code into a Flow, creates a Change record and I want it to come back out of the flow at the edit screen of that Change record.  Right now it gives me a redirect error.  

 

This is what I had, but it was giving me a redirect error.  I'm not familiar with apex, someone else gave me this example and I edited it to fit our objects so I'm not sure what else I need to do or create to get it to work
Apex code:

<apex:page standardController="Case">
        <flow:interview name="Case_to_Change_Flow" finishLocation="/{!Id}">
        <apex:param name="CaseId" value="{!Id}"/>
    </flow:interview>
   
</apex:page>


Button code:
 /apex/Case_to_Change?CaseID={!Case.Id}

If you could tell me exactly what else I need that would be awesome! Thanks in advance!

cl0s3rcl0s3r

Are you using Flows?

StaciStaci

Yes, The button on the case object calls apex code, which calls the flow.  The flow creates the change (custom object) record.  I'd like, when the flow finishes, for it to return to the edit screen of the change record.