• Martin Y
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi

 

We have an issue when using the chatter component.  I have a custom VF page, containing a contact record plus a new "note" field and a "save note" button.  The button is simply calling a class action.  The page works fine without the chatter component.  The chatter feed functionally works just fine, but when we show feed and click in the "write something" box (don't press share), then click back to the new field, the save button doesn't fire the action.  The action does fire if we don't click in the feed "write something" field.  Incidentally, the button will fire the onclick activity.  It doesn't matter whether I remove the onclick or not, the action doesn't fire.

 

Anyone else had this problem and resolved it?

 

Relevant sections of code:

<chatter:FeedWithFollowers entityId="{!Contact.Id}"/>

 

<apex:pageBlockButtons location="Bottom">
    <apex:commandButton action="{!SaveNote}" value="Save Note" onclick="return validate('Save')"/>
    <apex:commandButton action="{!AddNoteAttachment}" value="Add Attachments" onclick="return validate('Attachment')"/>
</apex:pageBlockButtons>

 Many thanks!

 

Martin

Hi

 

I'm trying to use a function call to return a new email file attachment (I'm calling the subroutine from a few different places within the same batch class).  However, I'm getting a compilation error: invalid constructor name: EmailFileAttachment.  Does this mean I cannot return a Messaging.EmailFileAttachment constructor from a function, or am I doing something wrong?

 

private Messaging.EmailFileAttachment (Attachment AttachRec)
{
    // Create the mail message attachment
    Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
    attach.setContentType(AttachRec.ContentType);
    attach.setFileName(AttachRec.Filename);
    attach.setInline(false);
    attach.Body = AttachRec.body;
    return attach;
}

 

Many thanks in advance!

 

Martin

Hi

 

I'm trying to use a function call to return a new email file attachment (I'm calling the subroutine from a few different places within the same batch class).  However, I'm getting a compilation error: invalid constructor name: EmailFileAttachment.  Does this mean I cannot return a Messaging.EmailFileAttachment constructor from a function, or am I doing something wrong?

 

private Messaging.EmailFileAttachment (Attachment AttachRec)
{
    // Create the mail message attachment
    Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment();
    attach.setContentType(AttachRec.ContentType);
    attach.setFileName(AttachRec.Filename);
    attach.setInline(false);
    attach.Body = AttachRec.body;
    return attach;
}

 

Many thanks in advance!

 

Martin