16 votes
Accepted

How to show a screen flow as a Listview button on any object?

As of today (Spring 22), there isn't a true equivalent of the Flow Quick Action for List Views, per se. You can launch a Flow from List Views, however. Get the Flow's URL (you can see it when you ...
Jeff Kranz's user avatar
  • 1,947
11 votes
Accepted

Lightning inside visualforce page - how to get Lightning Components data/value from visualforce page

This is possible you can have communication enabled between lightning component and visualforce both way. Consider below code: <apex:page > <apex:includeLightning /> <div id="...
Kiran Machhewar's user avatar
9 votes
Accepted

Generate Tab URL With Pure Visualforce

You can use the $ObjectType global variable to get the key prefix: retUrl='/' & $ObjectType.RelatedProfessionals__c.keyPrefix + '/o' You can't use it here, but with some SObjects, you can use ...
Adrian Larson's user avatar
  • 150k
9 votes

Custom List view buttons in the lightning environment

You can create a Visualforce page using the standard list controller, and define it as a list button. Refer this link: Adding Custom List Buttons using Standard List Controllers These display as ...
Christian Carter's user avatar
8 votes

Custom List view buttons in the lightning environment

This might be helpful - https://developer.salesforce.com/blogs/developer-relations/2016/09/take-the-first-steps-ways-you-can-replace-javascript-buttons.html You can create a Lightning component to ...
Nilesh Dethe's user avatar
8 votes
Accepted

JS button to Call WebService / Apex, and return id

sforce.apex.execute is an async method and therefore you will need to use callback function. https://developer.salesforce.com/forums/?id=906F00000008x3bIAA {!REQUIRESCRIPT("/soap/ajax/30.0/connection....
Chris Chen's user avatar
8 votes
Accepted

Dynamic Related List Not Supporting Custom Actions?

You cannot add custom action on the related list. Review the bellow idea : Allow quick action on related lists However, you can use a custom button on the related list (Display Type : List Button). ...
Vitalii Dehnerys's user avatar
7 votes
Accepted

Opportunity Edit - Javascript Button

You should be enclosing your conditions in the merge field; this makes it a lot easier to read: if( {!ISPICKVAL(Account.Type, 'New') && ISNULL(Opportunity.Ad__c) } ) { As noted in the ...
sfdcfox's user avatar
  • 487k
7 votes
Accepted

Replace ID with API Name

I believe the only way to to it would be to use a VF page as the Link and use an action method to navigate to the report. In the VF page controller query for the report by name: <page name="...
Eric's user avatar
  • 54.1k
7 votes

Refresh the page after the flow completes

Unfortunately, the UnofficialSF solution didn't work for me, but was able to get a similar solution working. Similar to the UnofficialSF component, add the following aura component to your flow where ...
Charles Naccio's user avatar
7 votes
Accepted

How to pass selected record Ids from list view to flow URL?

I figured out the issue. In the button URL I don’t need to pass any flow parameters. In the flow, I should have a collection variable called ids. You cannot use any other name other than ids. Please ...
Krishnamurthy's user avatar
6 votes
Accepted

Redirect to Visualforce page from lightning component

Updated Lightning Component controller ({ doInit : function (component, event) { var action = component.get("c.returnFlag1"); action.setParams({ "opptyId": component....
SFDC shaikh's user avatar
6 votes
Accepted

Refresh View lightning app into visualforce

Lightning statndard events like $A.get("e.force:refreshView").fire(); are not supported when lightning component is used in visual force pages.
Rishi Golyan's user avatar
6 votes
Accepted

Create custom 'take ownership' list view button in Lightning

JavaScript buttons don't work the way you expect, and I'm pretty sure that the code you're trying to use won't work. That said, you have an alternative you can use (tested/verified). First, create a ...
sfdcfox's user avatar
  • 487k
6 votes
Accepted

How to get custom URL Button to display on Lightning record page?

You need to add the Google Info custom button from the Salesforce1 & Lightning Actions bucket to the Salesforce1 & Lightning Actions section in the layout for it to appear in the Lightning ...
sfdcFanBoy's user avatar
  • 4,054
6 votes
Accepted

Prevent New Child Record without triggers

If you are creating child record from parent record's detail page then create a recordtype on the parent object and create a separate page layout where you can remove the New button of Child object's ...
Santanu Boral's user avatar
6 votes
Accepted

Problem with passing parameter through URL to an LWC present inside a lightning tab

You should use a namespace prefix for your query parameter. If the component isn’t part of a managed package you should use c__ as prefix. So the button url would be /lightning/n/Cops_Rate_Profile_Tab?...
RubenDG's user avatar
  • 8,422
5 votes

Id is not defined while opening a new JS window

Apex variables are not part of Javascript runtime, they are rendered from server side. You need to enclose the Apex variables with single quote in client side. Try this: window.open('/apex/...
karthikselva's user avatar
  • 2,446
5 votes
Accepted

Custom Button Issue

Please change the URL to: /500?rlid=RelatedCaseList&id={!Case.ContactId} And keep the button behaviour as Display in existing window without sidebar or header Please let me know if it works. ...
Shailesh Patil's user avatar
5 votes
Accepted

emailauthor page parameter from (p26) not working

You have to specify the exact option value, meaning you have to know up to three things: The custom ID associated with the email (e.g. for organization-wide addresses), the email being sent from, and ...
sfdcfox's user avatar
  • 487k
5 votes
Accepted

Adding One Year to Date Field Value Through Custom Button

It would look something like this: {!requireScript("/soap/ajax/37.0/connection.js")} var newRecords = []; var c = new sforce.SObject("Invoice_Statement__c"); c.id = "{!Invoice_Statement__c.Id}"; c....
sfdcfox's user avatar
  • 487k
5 votes
Accepted

How to get/pass parameter to VF page via JS? How to update field with value from VF page? (updated with BOTH parts)

For 1st Part 1st Method: Create a Button with Onclick Javascript and add the below code in it. {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} ...
Subhash's user avatar
  • 1,716
5 votes
Accepted

Non-void method might not return a value or might have statement after a return statement

Change: If(AccredList.size()>0) return 'Opportunity Number is ' + AccredList; To something like: If(AccredList.size()>0){ return 'Opportunity Number is ' + AccredList.size(); } ...
Eric's user avatar
  • 54.1k
5 votes
Accepted

Run a mass action on multiple records in a list view

List View Buttons Not Available in LEX To Answer the statement "All my list button aren't available in lightning experience", any onclick javascript button that you have in salesforce classic will ...
Sumuga's user avatar
  • 2,129
5 votes
Accepted

Convert javascript button to quick action

I think no matter what kind of Quick Action you do, native or customized, it will always open a modal window in Lightning. You could create a small VisualForce page or Lightning component to add ...
Charles T's user avatar
  • 11k
5 votes
Accepted

Pass Case Ids collection to visual workflow from Case List View Custom Button and update cases taking from input screen

Create a List View Custom button and use this code to pass parameters to the flow. Flow parameters: vSelectedCaseIds which contains case ids collection which can be found from {!GETRECORDIDS($...
Santanu Boral's user avatar
5 votes
Accepted

Lightning button not showing in community

I am assuming you are not just missing the button, your component may not be available to use in communities. You are missing implements="forceCommunity:availableForAllPageTypes" in your component. ...
Rao's user avatar
  • 16.7k
5 votes

JSENCODE Returning Id rather than Name

If you want to merge in the name, you need to merge in the Name field. {!JSENCODE(Case.Contact.Name)} Make sure you add this field to your query.
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

How to get custom Visualforce button to display on lightning record page?

Same as answered in your earlier question. You need to add the button to the Salesforce1 and Lightning Actions section for the button to show in Lightning Experience. Currently it will just show in ...
sfdcFanBoy's user avatar
  • 4,054
5 votes
Accepted

Create Custom Button in Lightning that calls an Apex Class Method

You need to create a lightning component that implements force:lightningQuickAction. After this you will be able to override your Action using this lightning component. You can program your client ...
the_phantom's user avatar
  • 2,005

Only top scored, non community-wiki answers of a minimum length are eligible