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
Matthias KimmigMatthias Kimmig 

How can I display error messages on a popup?

Hi,

I hava create a button in a custom object which execute a apex-class.
This apex-class create a contact and a opportunity with the information from the custom object.

It works fine. Now, I would like to throw exceptions and display the error messages on a popup.

How can I do this?

Regards,
Matthias
Rajesh PotnuruRajesh Potnuru
Hello Matthias,

To show error message popups , better to go with Java script.. check the below example.,


function deleteConfirm(msg)
  {
var confDel = msg;
if(confDel ==null)
  confDel= confirm("Would you like to perform this delete action?");
else
  confDel= confirm(msg);
 
if (confDel== true)
  doSubmit('Delete');
  }


http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_js.htm


Thanks & Regards,
Rajesh Potnuru

* Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.