• Dane Dowell
  • NEWBIE
  • 10 Points
  • Member since 2019

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

We have several brands being worked within one Salesforce org by using a multi-picklist field called “Brand Connect” to keep it all separated and organized.

We have 2 custom fields, called “The Appointment Setter” and “The Appointment Setter ID”. These are used to reference a User ID and there is automation running so whenever The Appointment Setter is input, their persons associated User ID is populated in The Appointment Setter ID.

For our email automation we have Process Builder calling Apex. It was designed to use The Appointment Setter ID to set the correlated “Sender ID” for the email, and it pulls in email signature data from custom fields on the User object that are set up for each brand (so tagline and email address can be set uniquely for each brand).
 

The problem is that the developer we worked with only set it up for one brand, and we need it to work for all the brands in our org.

Here's the email template:

User-added image

To support this we have a visualforce component called "SenderSignature" -- Here we need some sort of If/Else statements at the end to reference the custom field called "Brand_Connect__c" ...

1. Company should be the value of Brand Connect
2. For Sig_Tagline and Sig_Email, we have custom fields on the User object for each individual brand. What we want to do is define the references for each brand. So “if Brand Connect = Advisor Fuel then use Sig AF Tagline” and “if Brand Connect = DB Lightning then use Sig DB Email”.
 

<apex:component controller="SenderSignatureCtrl" access="global">
   <apex:attribute name="company" description="name of company" type="string"/>
   <apex:attribute name="senderId" description="Id of sender" type="String" required="required" assignTo="{!appSetterId}" />
   <p>{!Sender.Sig_Tagline__c}</p>
   <p>{!Sender.Sig_Name__c}</p>
   <p>
       {!company}
       <br/>
       {!Sender.Sig_AF_Title__c}
       <br/>
       {!Sender.Phone}
       <br/>
       {!Sender.Sig_AF_Email__c}
   </p>
</apex:component>
 

and here's the apex class "SenderSignatureCtrl"
 

public class SenderSignatureCtrl {
   public String appSetterId { get; set; }
   public User sender {
       get {
           if (appSetterId != null) {
               sender = [SELECT Sig_Tagline__c, Sig_Name__c, CompanyName, Sig_AF_Title__c, Phone, Sig_AF_Email__c FROM User WHERE Id = :appSetterId];
               system.debug('Sender Signature ==> ' + sender);
           }
           return sender;
       }
       set;
   }
}


 

I'm happy to provide any additional information that may be necessary to troubleshoot the problem. Thank you so much to whoever is willing to help!

We have several brands being worked within one Salesforce org by using a multi-picklist field called “Brand Connect” to keep it all separated and organized.

We have 2 custom fields, called “The Appointment Setter” and “The Appointment Setter ID”. These are used to reference a User ID and there is automation running so whenever The Appointment Setter is input, their persons associated User ID is populated in The Appointment Setter ID.

For our email automation we have Process Builder calling Apex. It was designed to use The Appointment Setter ID to set the correlated “Sender ID” for the email, and it pulls in email signature data from custom fields on the User object that are set up for each brand (so tagline and email address can be set uniquely for each brand).
 

The problem is that the developer we worked with only set it up for one brand, and we need it to work for all the brands in our org.

Here's the email template:

User-added image

To support this we have a visualforce component called "SenderSignature" -- Here we need some sort of If/Else statements at the end to reference the custom field called "Brand_Connect__c" ...

1. Company should be the value of Brand Connect
2. For Sig_Tagline and Sig_Email, we have custom fields on the User object for each individual brand. What we want to do is define the references for each brand. So “if Brand Connect = Advisor Fuel then use Sig AF Tagline” and “if Brand Connect = DB Lightning then use Sig DB Email”.
 

<apex:component controller="SenderSignatureCtrl" access="global">
   <apex:attribute name="company" description="name of company" type="string"/>
   <apex:attribute name="senderId" description="Id of sender" type="String" required="required" assignTo="{!appSetterId}" />
   <p>{!Sender.Sig_Tagline__c}</p>
   <p>{!Sender.Sig_Name__c}</p>
   <p>
       {!company}
       <br/>
       {!Sender.Sig_AF_Title__c}
       <br/>
       {!Sender.Phone}
       <br/>
       {!Sender.Sig_AF_Email__c}
   </p>
</apex:component>
 

and here's the apex class "SenderSignatureCtrl"
 

public class SenderSignatureCtrl {
   public String appSetterId { get; set; }
   public User sender {
       get {
           if (appSetterId != null) {
               sender = [SELECT Sig_Tagline__c, Sig_Name__c, CompanyName, Sig_AF_Title__c, Phone, Sig_AF_Email__c FROM User WHERE Id = :appSetterId];
               system.debug('Sender Signature ==> ' + sender);
           }
           return sender;
       }
       set;
   }
}


 

I'm happy to provide any additional information that may be necessary to troubleshoot the problem. Thank you so much to whoever is willing to help!