+ Start a Discussion
khillan bhardwajkhillan bhardwaj 

Creating custom button by using Apex code like trigger or apex class

hello all,

              i want to create custum button by using apex class. i know rarely it possible. but i have such require ment . i can create custom button for standard button and add then in package . but in oganization in which package installed may have a number of custum object in which i want to add custom button on detail page . if there is any pssiblity to create custom button by apex code plz let me know

 

thanks & Regards

khillan singh

TheDoctorTheDoctor

This page has a great walkthrough of how to acheive this using a custom button that redirects to a VF page with an onLoad action:

 

http://sfdc.arrowpointe.com/2009/01/08/invoke-apex-from-a-custom-button-using-a-visualforce-page/

 

Otherwise you could think about using JavaScript behind your button to call the class.

welcomewelcome
Hi,

Have you got the solution for your requirement, I need to do the same.. can you help me on this.