Questions tagged [pagemessages]
The pagemessages tag has no usage guidance.
68
questions
0
votes
2
answers
205
views
How to Edit or Override Success Messages
I have some custom objects that are displaying a default success message when the record is created or updated. The default message is displaying "Review a0GDn000001NLLJMA4 was saved". Where ...
0
votes
1
answer
143
views
Is it possible to customize apex page messages in visualforce?
I basically want to change the title of the box showing the mes
Is it possible in an official way to change those titles? Or do I have to write custom html to accomplish that? I didn't find relevant ...
0
votes
1
answer
634
views
Align position of <apex:pageMessages> tag
I would like to center the error message displayed via <apex:PageMessages> however it is not responding to div/css tags such as div align="center" or text-align: center; - does anyone ...
0
votes
1
answer
142
views
Using existing VF page in Lightning experience
We need to use existing VF pages in lightning experiences. We changed the styling using standard attribute lightningStylesheets="true".
But apex:pageMessages seems to be not working on those ...
0
votes
0
answers
95
views
Unable to cover page messages code from test class
The controller is working as expected even try block is covering except the success message even warning messages are also covering. But i didn't set up any exception in my test class.
Following code ...
1
vote
1
answer
1k
views
I want to display an error message on top and bottom of a Visualforce page using Apex. How to do so?
We have used this code previously for showing error, but now we want to show the error on top and on the bottom of the page:
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, ...
10
votes
2
answers
2k
views
How do you clear the ApexPages.getMessages() collection in a test?
The longtime frustration of not being able to clear the messages in tests is marked as a delivered idea in Summer '18 here Add support for clearing PageMessages via Apex.
A failing of that forum is ...
1
vote
3
answers
625
views
Make fields mandatory when status is complete
I have a status field on contact,when status is complete,remarks should get mandatory..I wrote if condition for this in controller,but it is not taking remarks field as mandatory..how to write this? ...
4
votes
1
answer
264
views
Does ApexPages.Messages support multiple message severities?
When running the following method the final debug shows that only the fatal severity messages are included. The other debugs show that it does see the other severities and does at least attempt to add ...
0
votes
1
answer
2k
views
How to show user a message and stop APEX Class execution
I have a APEX Class that runs from a button on a standard record page. It creates a related record in another table. The code works fine as it is now.
But I want to add a feature that does a ...
2
votes
1
answer
4k
views
how to stop firing oncomplete if save action has errors
My requirement is to stop oncomplete call if save action has errors. I know I am doing some silly mistake.
Here I am unable to stop calling oncomplete function.
Requirement is, from VFP save method,...
2
votes
2
answers
3k
views
How to addmessage from a trigger to a visualforce page
I have a visualforce page with a controller extention. This page has some inputfields where
I want to send a waring on the page before insert if the fielsd are filled in incorrectly.
I am using a ...
0
votes
0
answers
214
views
How to remove The Red 'Error' Text and the Exclamation mark from apex page message [duplicate]
I want to remove the red 'Error' text and the exclamation mark from apex page message and want to show only the Message. Please see image below:
Providing sample code for reference:
Page:
<apex:...
1
vote
3
answers
1k
views
Show same pagemessage multiple times on top of VF page
I have a VF Page with a lot of fields and most of them are mandatory. I am handling the required part via my Apex Controller and not "required=true" attribute as I have used too much Javascript on my ...
1
vote
2
answers
378
views
Why am I getting duplicate ApexMessages when concatenating string in a try/catch
I have two different approaches for adding an error to my visualforce page. The first approach I am concatenating a string at the end of exception. The second approach I am simply returning the ...
1
vote
2
answers
131
views
pageMessages should ignore Database.insert(records, false) errors
I am creating some records in my controller but some of them might fail during insert due to duplication, so I use Database.insert(records, false).
It works just fine and ignores records that already ...
0
votes
1
answer
33
views
Visualforce Error Message displaying the save mode instead of displaying the edit mode
I'm facing a simple issue where I'm displaying an validation error message from trigger based on some condition in the visualforce page. Upto this it is working fine. But after displaying the error ...
0
votes
0
answers
204
views
Display of a dialog window
I'd like to know how to display a dialog or pop-up window in Salesforce.
I'm overriding the standard convert button by using associated custom visualforce page.
I use the custom visualfoce page to ...
1
vote
1
answer
803
views
Display custom message using Visualforce depending on custom field criteria
I have used the answer to this question on Stack exchange to create a message to display on my custom object.
What do I need to add to it to only display the message if a certain condition in my ...
3
votes
1
answer
1k
views
Overriding Standard error message in VF Page
For a currency field (say 10,2) , Salesforce displays a standard error message below the field as
Error: Number is too large.
My requirement would be to display an apex page message instead.
I ...
2
votes
1
answer
233
views
pageMessages not showing when commandButton disabled
I have the following VF page:
<apex:page controller="Invoices">
<apex:form >
<apex:pageBlock id="pageBlock1">
<apex:pageMessages id="messages" />
<apex:...
0
votes
1
answer
4k
views
Show page message and reload page
I have a VF page and extensions for it where I perform update operation. If it is successful or not I want to display page message - on VF I have
<apex:pageMessages />
and in Apex controller ...
0
votes
1
answer
36
views
pagemessages not showing on vfpage when contact lastname not entering
public class contact_fetch_List_method_controller{
public contact consave{get;set;}
public contact_fetch_List_method_controller(){
consave = new contact();
}
public pageReference Save(){
if(...
2
votes
1
answer
2k
views
Apex PageMessages are not displayed when using OnComplete JS for CommandButton
I have VF page shown in the service console.
When Apex command button is clicked it is invoking controller action method.
OnComplete on the command button executes the JS function which refreshes the ...
1
vote
2
answers
6k
views
Show error message in Visualforce Page
I have a visualforce page with custom controller. I have added apex:pagemessages in a helper static class and for some reason the messages are not displaying on my Visualforce page and I'm not sure if ...
0
votes
2
answers
93
views
not showing pageMessages when search box is empty and direct click on the search button
class code
public class democlass {
public string searchboxstring{get; set;}
public list<contact> result {get; set;}
public Integer counter{get;set;}
public democlass(){
//result = new ...
0
votes
1
answer
64
views
How to modify a Visualforce error message
When I update a record from a details page I get the error
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your ...
1
vote
1
answer
386
views
Display message
I would like to display message with particular information in Salesforce.
I have created a custom field of type rich text and made it read only but it does not allow me to display the message I want....
0
votes
2
answers
8k
views
Id Value is not valid for standard controller
I am getting the error mentioned in subject with below code when execution runs through Else condition without DML statement. I am not getting how to change Pagereference?
Apex Code
AllocQ= ...
2
votes
1
answer
327
views
Page displays apex scripts while using render="true" in <apex:page message> visualforce page?reasons?
When I am trying to display page message in vf page I am getting the following issue and that is because of using rendered="true"
Page getting displayed with following code:
visualforce page code:
...
1
vote
2
answers
169
views
Page message Problem?
I have four scenarios with catch exceptions in controller and used "apex:pageMessages" only once in Visualforce page.But that is not working for all the scenarios? Is it mandatory to use "apex:...
2
votes
1
answer
961
views
Error Message in Visualforce page
I have a visualforce page which has a apex:pagemessage tag. A method on the controller is checking if a field in the visualforce page is valid.
I want to display an error message but I do not want ...
0
votes
1
answer
230
views
Apex Page Message
I have a custom page, and it has a field which is inline editable. If the value of the field is changed to null, an apex page message is displayed, the logic of which is written in the controller:
...
0
votes
1
answer
4k
views
Rerender two visualforce elements after each other?
I have a Visualforce page, with a pageblocktable that is dependent on some date fields. When the dates change I would like to rerender the table, and then rerender the pageMessages. At the moment, ...
0
votes
1
answer
3k
views
Lightning - how to use apex:pageMessages in a VisualForce page with SLDS
I'm using SLDS library to decorate a VisualForce page and have got some standard validation rules defined at the back,
How could I throw the error message to the VF page with using apex:pageMessages?
...
0
votes
1
answer
60
views
How to clear the Info message appearing on the Lookup popup window
As we can see in the above image, when user is trying to selecting a lookup record, I have this page message appearing on the lookup window.
I am confused on how to debug this. Searched the whole ...
0
votes
1
answer
637
views
apex page messages are not working in javascript
I want to show apex:pageMessage when validation error occured. In the below code i called save method from the javascript. previusly save method called from action function. after changing code based ...
1
vote
2
answers
3k
views
Display warning message
I would like to know how to be able to display a warning message in a page.
I have created my own custom visual force page:
<apex:page standardController="Lead" extensions="...
0
votes
2
answers
282
views
Do not rerender a panel when there is an error
Is there a way I could not rerender a certain <apex:outputPanel /> when there is an error in a <apex:pageMessages />?
EDIT:
I tried, I use two actionFunction. the first one is to ...
0
votes
1
answer
889
views
How to give file upload success message in vf page
I want to give a file upload and record insert success message. I am udsing the below apex class. Can anyone help me how to give success message.
public with sharing class devoteeinsert{
//...
2
votes
1
answer
973
views
Set up an Alert on the "New" opportunity button
Is there any way to set up an alert message when a user clicks the "New" button either on the Opportunity object or on the account related list? I don't think creating a new button will help because ...
2
votes
1
answer
154
views
Visualforce Apexpage 'AJAX' like response
I have written a VF Page:
<apex:page controller="DocumentObjects">
<apex:form >
<apex:pageBlock title="Document objects">
<apex:pageMessages />
<apex:...
1
vote
1
answer
5k
views
Rerendering apex:pageMessages (when clicking button) causes the message to be not displayed
I had an issue when re-rendering apex:pageMessages when a command button is clicked. If I remove the re-render from the apex:commandButton, the apex:messages is displayed correctly.
Here's my ...
2
votes
1
answer
864
views
DML Exception and validation rule in Salesforce
Today I had a very unusual experience while working on a VF page. It's a very simple page and controller but the results were quite strange. Actually, I am trying to save an Opportunity and if there ...
0
votes
2
answers
4k
views
Page Message not show in my VF Page
I just used the below code in my application but the page message not show. What i doing wrong
VF Page:
<apex:pageMessages id="msgs"/>
<apex:pageBlock >
<apex:outputpanel id="outid" &...
0
votes
0
answers
271
views
DMLException error not coming properly
I am trying to upsert a record and and I am expecting, when I hit the button, then it will check for Invalid Email address, and if there is any then it will show me the error in the pageMessage.
...
8
votes
3
answers
11k
views
How to test page messages in unit test?
I have an Apex controller which unsubscirbes users from email via an opt-out form. I have written a test class which tests the method (or atleast partially at the moment). I would like to know how I ...
2
votes
3
answers
5k
views
How to display different error messages at different places on a Visualforce page
How can I control how error messages from apex show at different places on a page?
I`d like to show ErrorA to RegionA if ErroA occured, and ErrorB to RegionB if ErrorB occured.
Does anyone have any ...
1
vote
1
answer
4k
views
Return apex page message to Java script alert popup
I want to show the error message on Javascript alert popup.Is it possible?
I have a custom detail button which calls below page and creates a related record.If related record exists then I want to ...
2
votes
1
answer
707
views
Output label not conditional
I have a requirement to show page message for a particular selected template. The template selection done here. But render is always returning true in this case. Can someone help me here?
<apex:...