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
BillPowell__cBillPowell__c 

FinishLocation Url Help

Have a custom button on a related list that calls a VF page that passes the ID into a flow to update a field on selected records in the related list. I don't know the first thing about code but have been able to piece some things together with some help. 

Unfortunately, when the user uses the button, it returns them to the custom object tab, not the record they were working on (parent record). I know there is a way to do itt, but can't get anything I found on the dev forums to work correctly. 

Suggestions? Here's my code for the VF page:

<apex:page StandardController="Sample_Order_Line_Items__c" tabstyle="Sample_Order_Line_Items__c" recordSetVar="SOLI" >
    <!-- Add below each field you reference in your Flow -->   
    <apex:repeat value="{!SOLI}" var="row" rendered="false">
        {!row.id}
        {!row.Status__c}
    </apex:repeat>
    <!-- Runs your Flow -->   
    <flow:interview name="SOLIComplete"
          finishLocation="{!URLFOR($Action.Sample_Order__c.Tab, $ObjectType.Sample_Order__c)}">
        <apex:param name="Selected" value="{!Selected}"/>
    </flow:interview>
</apex:page>