+ Start a Discussion
John PipkinJohn Pipkin 

Can you use Database.setSavePoint() in Custom Javascript Detail Page Button?

I have a detail page button that executes Javascript on click. In the button there are multiple DML statements but I would like to set save points so if an error occurs, I can roll back the changes. Is this possible without creating webservice apex methods?
Best Answer chosen by John Pipkin
claperclaper
Unfurtunately no. besides using webservices the next best thing is the Ajax toolkit http://www.salesforce.com/us/developer/docs/ajax/ , but this does not support creating a Database.setSavePoint();

All Answers

claperclaper
Unfurtunately no. besides using webservices the next best thing is the Ajax toolkit http://www.salesforce.com/us/developer/docs/ajax/ , but this does not support creating a Database.setSavePoint();
This was selected as the best answer
John PipkinJohn Pipkin
Bummer. Webservice it is then. Thanks Claper