Example: We have a custom list view action button in lightning experience and I want to check some conditions on button click and before it updates the record. I don't find any other way to check this, but in 'before update trigger' so want to check the source of event in apex before performing the operation.
1 Answer
Did you try overriding list view button with vf page where you can put any custom logic .
<apex:page
showHeader="false"
standardStylesheets="false"
sidebar="false"
applyHtmlTag="false"
applyBodyTag="false"
docType="html-5.0"
standardController="Account"
recordSetVar="accounts"
extensions="CustomController">
</apex:page>
-
Thanks for the response. I didn't try to override the list view button. I'll try with this approach. Commented Feb 19, 2020 at 10:36