• Jay_Hunter
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies

I'm struggling with being able to show a basic success message to the user using the standard <apex:pagemessages /> component.  I've got it on the page, but it never shows a message.  Here's the page:

 

<apex:pageblock > <apex:pageblockSection > <h1>Page Messages:</h1> <apex:pageMessages /> </apex:pageblockSection>

 Nothing unusual there, right?

 

Here's the controller method that generates the message.  Basically I've got a list with checkboxes, and the user selects some, clicks a button, and then records are inserted based on the selections.  When that happens, I'd like to let the user know the insert was successful.

 

 

if (billTos.size() > 0) { try{ insert billTos; // set the message for the user ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Bill-To Sites successfully created')); } catch (DMLException e){ // show the messages to the user ApexPages.addMessages(e); } } else { // set the message for the user ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'No Sites Selected')); }

 

My records are being successfully inserted, so it should be hitting the success message.  But it's all silent on the page -- nary a peep.  What the heck am I doing wrong?  This seems simple!!

 

 

 

One of my users challenged me to do something regarding events.  We have a custom project object.  On this object, there are 2 date fields, Start Date & End Date.  The project is owned by a user.  I would like to somehow programatically create a calendar event for this user with the start/end dates set from these fields.  There doesn't seem to be an easy way via a workflow rule, as it only seems to let you create tasks, and not events.

Seems like I would have to implement some sort of custom code to do this, any ideas or strategies suggested would be much appreciated.

--Jay Hunter

I'm struggling with being able to show a basic success message to the user using the standard <apex:pagemessages /> component.  I've got it on the page, but it never shows a message.  Here's the page:

 

<apex:pageblock > <apex:pageblockSection > <h1>Page Messages:</h1> <apex:pageMessages /> </apex:pageblockSection>

 Nothing unusual there, right?

 

Here's the controller method that generates the message.  Basically I've got a list with checkboxes, and the user selects some, clicks a button, and then records are inserted based on the selections.  When that happens, I'd like to let the user know the insert was successful.

 

 

if (billTos.size() > 0) { try{ insert billTos; // set the message for the user ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Bill-To Sites successfully created')); } catch (DMLException e){ // show the messages to the user ApexPages.addMessages(e); } } else { // set the message for the user ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'No Sites Selected')); }

 

My records are being successfully inserted, so it should be hitting the success message.  But it's all silent on the page -- nary a peep.  What the heck am I doing wrong?  This seems simple!!

 

 

 

Hi,

 

I'm having trouble getting the "ApexPages.addMessage" message to display in my VF page when there's an error.  Below is the code in the extensions that validates the input before saving the record.  Any help would be greatly appreciated.  Thank you in advance.

 

"

...
    //
    //Save current record
    //
    public PageReference save(){
        if (validate_save_data()) {                    
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error: Invalid Input.');
            ApexPages.addMessage(myMsg);
            return null;
        } else {
            upsert erma;
            return (new ApexPages.StandardController(erma)).view();       
        }      
    }
 
    //
    // Validate input data before saving  
    //
    public boolean validate_save_data () {
        if (erma.sales_area__c == null) {
            return true;
        } else {
            return false;
        }
    }
...
"

Hi All,
 
With the existing reporting limitations with salesforce's "Reports Module",(such as cannot join more than 5 objects, cannot run outer join queries, etc) are there any third party reporting tool which is really cool and widely used with salesforce and which can be integrated with salesforce?
 
Thanks and regards,
Ambili
  • January 22, 2008
  • Like
  • 0