• Kevin Strange
  • NEWBIE
  • 35 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 12
    Replies
Hi, 
  I have a visualforce page with various inputText fields that are being concatenated into a single field - everything is working 
  However, I would like to "Prepend" or add text to the submitted value but only if it is filled in. Should this be done in the Controller 
 or can it be achieved in visualforce or both. 

  Example: I have 2 inputtext fields.   One called Fruit the other Vegetables 
  If someone filled out the Fruit Field with "Apple" but left the Vegetable field blank  I would like the result to  be:
   Fruit: Apple 
  Vegetable did not pass because it was blank. 





 
Visualforce 
<apex:page controller="SubmitCaseController">
<h1>Submit New Case</h1>
    <apex:form >
        <apex:pageMessages />
        <table>
            <tr>
                <th>Your Name:</th>
                <td><apex:inputText value="{!c.SuppliedName}"/></td>
            </tr>
            <tr>
                <th>Your Email:</th>
                <td><apex:inputText value="{!c.SuppliedEmail}"/></td>
            </tr> 
            <tr>
                <th>Subject:</th>
                <td><apex:inputText required="true" value="{!c.Subject}"/></td>
            </tr>
            <tr>
                <th>Field1:</th>
                <td><apex:inputText value="{!Fruit}"/></td>
            </tr>
             <tr>
                <th>Field2:</th>
                <td><apex:inputText required="true" value="{!Vegetable}"/></td>
            </tr>                
            <tr>
                <td><apex:commandButton value="Submit Case" action="{!submitCase}"/></td>
            </tr>
        </table>
    </apex:form>
</apex:page>

******************


Apex Controller 

public class SubmitCaseController {
    public Case c { get; set; } 
    public SubmitCaseController() {
        c = new Case();
    }
    
    //Variables
    public String Fruit {get; set;}
    public String Vegetables {get; set;}

    
    public PageReference submitCase() {
   
            try {
                // Insert the case
                c.Description = 'Fruit\n' + 'Vegetable';
                INSERT c;
                return null;
            } catch (Exception e) {
                ApexPages.addMessages(e);
                return null;
            }
    }
}


 Any help would be much appreciated. 
 Thank You
Hi, 
  I have a visualforce page with various inputText fields that are being concatenated into a single field - everything is working 
  However, I would like to "Prepend" or add text to the submitted value but only if it is filled in. Should this be done in the Controller 
 or can it be achieved in visualforce or both. 

  Example: I have 2 inputtext fields.   One called Fruit the other Vegetables 
  If someone filled out the Fruit Field with "Apple" but left the Vegetable field blank  I would like the result to  be:
   Fruit: Apple 
  Vegetable did not pass because it was blank. 





 
Visualforce 
<apex:page controller="SubmitCaseController">
<h1>Submit New Case</h1>
    <apex:form >
        <apex:pageMessages />
        <table>
            <tr>
                <th>Your Name:</th>
                <td><apex:inputText value="{!c.SuppliedName}"/></td>
            </tr>
            <tr>
                <th>Your Email:</th>
                <td><apex:inputText value="{!c.SuppliedEmail}"/></td>
            </tr> 
            <tr>
                <th>Subject:</th>
                <td><apex:inputText required="true" value="{!c.Subject}"/></td>
            </tr>
            <tr>
                <th>Field1:</th>
                <td><apex:inputText value="{!Fruit}"/></td>
            </tr>
             <tr>
                <th>Field2:</th>
                <td><apex:inputText required="true" value="{!Vegetable}"/></td>
            </tr>                
            <tr>
                <td><apex:commandButton value="Submit Case" action="{!submitCase}"/></td>
            </tr>
        </table>
    </apex:form>
</apex:page>

******************


Apex Controller 

public class SubmitCaseController {
    public Case c { get; set; } 
    public SubmitCaseController() {
        c = new Case();
    }
    
    //Variables
    public String Fruit {get; set;}
    public String Vegetables {get; set;}

    
    public PageReference submitCase() {
   
            try {
                // Insert the case
                c.Description = 'Fruit\n' + 'Vegetable';
                INSERT c;
                return null;
            } catch (Exception e) {
                ApexPages.addMessages(e);
                return null;
            }
    }
}


 Any help would be much appreciated. 
 Thank You
I've been referencing the "Community Templates for Self-Service Implementation Guide" (https://help.salesforce.com/help/pdfs/en/community_templates.pdf), and on page 69 for the 'Topic View' page in the Napili template, it says "Results List (3) lets you change label text and whether the articles or discussions tab appears first".

I am able to change the label text, but I canot change which tab appears first. I would like the Article tab and it's content to appear when the page loads, but I am not seeing a setting for this. The only options I have is listed in the screenshot below:
Results List property editor for Topic View page

The manual says it is possible, but there is no setting for changing which tab appears first. Is there a typo in the guide? If not, how can I get the Articles tab to appear first instead of the Discussions tab?

I am able to set the 'Active Tab' to 'Articles' for the 'Search' page. How come the 'Topic View' page does not have this same setting? I spoke with general Salesforce support and they were able to replicate the issue on their end and directed me to the Dev forums. Any help on this is greatly appreciated.
 
Hello,

On the account detail we have the account type based on : client, supplier and customer.

When it comes for the supplier we have a section called Supplier with custom fields enabled. The same goes for the rest of the types.
Our problem is that depending on the account type we would like these sections to hide/unhide.

Any suggestions will be helpful.
Thank you in advance.
Hi,

I am using Case - Feed Layout for more actions. In the last release under Answer Customer tab, Salesforce moved the Discard Draft | Save links near to Send Email button. This is causing more issues with the end users. Is there any way to move Discard Draft | Save link away from there?

Please look into the below image,

User-added image

Thanks,

Raja
Hi, as title, how can I default an email template when click 'Reply' or 'Reply All' button on Case Feed item? Basically I would like to load a simple reply signature template when users click on  'Reply' or 'Reply All' button on Case Feed email feed item.

 I understand that the Smart Templates (Enable Default Email Templates) feature allows you to drive which template is pre-loaded from any apex logic you create, but that is for when you typing a new email. I would like to load a template when click on 'Reply' or 'Reply All' button and my template will be the top of the message and follow by my 'original message'

Is that possible?
 Hi i have a very simple email publisher to replace the original one :->

<apex:page standardController="Case" >
  <apex:emailPublisher entityId="{!case.id}" 
      fromVisibility="selectable"
      subjectVisibility="readOnly" 
      toVisibility="readOnly"
      fromAddresses="support@abc.com}"
      emailBody=""/>
      
</apex:page>
So i remove the standard 'Answer Customer' action and add in my custom emailpublisher in. Now all my email message record feed doesn't have the 'Reply' & 'Reply to All' button. What have i missed out? Basically what I want to achieve is I want the sender to default as our support email instead of user's personal email.

With Answer Customer Action
User-added image


Without Answer Customer action (replaced with my custom email publisher)
User-added image

Hi,

I have enabled the feature in my org. unfortunatelly, I encountered some issues. for example: I use Marketo for the leads Managment,

when Marketo tries to sync leads to salesforce, with no state mentioned, I recieve this error message:  

FIELD_INTEGRITY_EXCEPTION: There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: State/Province

Does someone know what it means and how can I fix it ?
Also, if the country is United States, is it must to have a state value ? can I have lead from United States but with empty state ? I really think this should be an option.

Thanks,
Shiran.

Hi i have case feed & email to case enabled  in my salesforce org. i have a situation where my customer send in email to my routing email and CC some other ppl.

In case feed, when i select answer customer the CC list member is gone, how can i remain the CC list from the original email?

And i have a email template which will load the message body -> {!EmailMessage.TextBody} but it wont load the body. any idea?

Hi There - I'm wondering if someone can help.... I'm trying to create a formula field that shows the Month and Year of the Lead Created Date.  For example, if a Lead was created  on 1/11/2009, I want the formula field to show January 09.  I contacted SFDC support but they can't help with formulas.  I tried to create different formulas but I kept getting sytax errors.  Any help you could provide is greatly appreciated!

 

Thanks!!

  • April 15, 2009
  • Like
  • 0