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
Ravi kumar 292Ravi kumar 292 

How to get the Custom Button Functionality using Apex or Trigger

Hi all,

I have a scenario. I have created a custom button with URL. When ever i click on the custom button i will hit the client URL. Now i want to use that functionality in APex class or Trigger. How can i do this.

Please help on this.
Thanks in advance.

 
Shashikant SharmaShashikant Sharma
Hi Ravi,

Could you share more information on the issue over here.
1. Share what have you done in custom button, is it a Executing Java Script
2. What you want to do with custom button in Apex class and Trigger

Thanks
Shashikant
JyothsnaJyothsna (Salesforce Developers) 
Hi Ravi,

Please check the below link for the above scenario.

http://salesforcesource.blogspot.sg/2009/06/triggering-apex-method-with-custom.html

Please refer the below link for more details on custom button.

https://developer.salesforce.com/trailhead/en/customizing_user_interface/ui_nav_buttons_links   

Hope this helps you!
Best Regards,
Jyothsna
Ravi kumar 292Ravi kumar 292
Hi Shashikant,

With Custom Button am hitting my client URL whenever lead is created for time being. But my reqirement is to hit the URL with Apex class or Trigger whenever a lead is created. Here i have to acknlodge them with LeadId, ContactId, Amount, etc.

How can i do this..