+ Start a Discussion
John Neilan 2John Neilan 2 

Call Process from VF Page Button

Hello,

Does anyone know if it is possible to call a Process from a Visualforce page button?  My situation is that I have a custom object with a Master-Detail relationship to the Opportunity object.  When the user creates a record of the custom object, I want to have a button that would create an associated Case when clicked.  In the past, I have done this via a URL hack, but I would like to use something more scalable like a Process but I'm not sure how to get the button to do this.  Any help is appreciated!
sfdcsushilsfdcsushil
Hi,

If i understood your requirement correctly, After cutom object record is saved, on custom object detail page you will have a create case button. Once user clicks on taht button , you want a case to be created and related to that custom object right? 
This can be done through javascript custom button. 
John Neilan 2John Neilan 2
Thanks @sushilbpositive.  Yes, you understand my requirement correctly.  However, I am not very familiar with JavaScript.  Do you happen to have any sample code on how it would work?
sfdcsushilsfdcsushil
John, Below link should help you. 

http://www.jitendrazaa.com/blog/salesforce/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit/
Deepthi BDeepthi B
Hello John,

I hope your requirement can be solved using Flows. Please check the below links which explains with an example.
https://www.buttonclickadmin.com/salesforce-visual-workflow-getting-started/ 
https://www.buttonclickadmin.com/salesforce-visual-workflow-advanced-flows/ 

Hope it helps you to some extent!

Regards,
Deepthi