• Yadhu Krishnan S
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi there, I've got a very specific design outcome I'm trying to achieve in Lightning and I can't find any info relating to this on any of the usual channels.

I want to present a flow as a modal dialog box from a list view. This would mean a user could select multiple records, and run through the flow for each of the items. I have built a version that meets these criteria with the exception of presenting the flow in a modal dialog over the current list. Although this final requirement isn't critical to the functionality of the process, it is important to keep the experience consistent with other lightning processes.

I understand this could be completed through JS if I was using Classic, but our org has migrated to Lightning a while back and won't be moving.

Also, interestingly I can get the desired modal display using an Action, but this can't be added to a list view (only a detail view) in my understanding.


Does anyone have any suggestions as to how this could be achieved? Thanks in advance!




This is the current process:

Visualforce Page, launched by list view button
<apex:page standardController="Contact" lightningStyleSheets="true" tabStyle="Contact" recordSetVar="AllContacts" >
        <!-- Add below each field you reference in your Flow -->   
        <apex:repeat value="{!AllContacts}" var="row" rendered="false">
            {!row.Id}
        </apex:repeat>
        <!-- Runs your Flow -->   
        <flow:interview name="Outbound_Call_Flow_Contact_v2" 
            finishLocation="{!URLFOR($Action.Contact.Tab, $ObjectType.Contact)}">
            <apex:param name="selectedContacts" value="{!Selected}"/>
        </flow:interview>
</apex:page>

Button settings
User-added image


List view
User-added image


Flow once launched (takes its own page, when I would like it to present modally)
User-added image

Desired presentation of flow
User-added image 
Hello,

I'd like to open a VF page in a subtab from a detail-page button.

If I use a URL with 'Display in an Existing Window', the VF page will open in the existing tab. If I use 'Display in New Window', the URL will show up in a new browser window. I'm trying to use the Console Integration Toolkit, instead of srcup() or some other unsupported workaround.

I created a javascript button, and tried the following code, but nothing happens. Literally nothing, no error, no page opening. What am I doing wrong? Help would be greatly appreciated.

{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/support/console/36.0/integration.js")}
sforce.console.getEnclosingPrimaryTabId(callOpenSubtab);
var callOpenSubtab=function callOpenSubtab(result) {
            sforce.console.openSubtab(result.id, 
               '/apex/vfpage', true, 'New Case');
}