• Mukul Mudgal
  • NEWBIE
  • 35 Points
  • Member since 2013

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

Hi,

 

Could you please help me write an IF statement (I think that's what I need?) for my Visualforce email template?

 

I have a VF email template that (among other things) pulls all information from the opportunity contact role related list. What I really would like is for it to just pull the information from one specific role = "Delivery Contact". So that if several roles are specified in the list the others will not show up in my email, and if the role "Delivery Contact" is not specified at all in the opportunity contact role related list  the table is left blank.

 

Is it an IF statement I need, and how would it look?

 

This is my code:

 

<p>
<table border="0" width="560">
<tr >
<th>Role</th><th>Name</th><th>Email</th><th>Phone</th><th>Primary Contact?</th>
</tr>
<apex:repeat var="ContactRole" value="{!relatedTo.OpportunityContactRoles}">
<tr>
<td>{!ContactRole.Role}</td>
<td>{!ContactRole.Contact.Name}</td>
<td>{!ContactRole.Contact.Email}</td>
<td>{!ContactRole.Contact.Phone}</td>
<td>{!ContactRole.IsPrimary}</td>
</tr>
</apex:repeat>
</table>
</p>

 

 Thanks in advance!

Hi,

    i have a situation,i.e when i update a record then it must compare previous value of name with present value of Name.Thus two Names must not be same. For this,i wrote trigger as well as validation.Both are working but when i edit record for changing the other field and i click save,again it shows error.But we dnt want that,we need logic executed only for particular Name updated.

Can anyone suggest me the logic for  validation...

 

 

 

Validation:

AND( ISCHANGED( Name ) ,  NOT(PRIORVALUE( Name )   =    Name)  )

 

I have 4 date fields.

 

D1 , 2, 3, 4

 

I want a VR which validates, IF D1> (2 or 3 or 4) then an error should throw up.

Can this be written as a single VR in the field D1?

 

Need ASAP assistance pls.

 

Thanks,

 

  • March 04, 2013
  • Like
  • 0

Hi,

 

Could you please help me write an IF statement (I think that's what I need?) for my Visualforce email template?

 

I have a VF email template that (among other things) pulls all information from the opportunity contact role related list. What I really would like is for it to just pull the information from one specific role = "Delivery Contact". So that if several roles are specified in the list the others will not show up in my email, and if the role "Delivery Contact" is not specified at all in the opportunity contact role related list  the table is left blank.

 

Is it an IF statement I need, and how would it look?

 

This is my code:

 

<p>
<table border="0" width="560">
<tr >
<th>Role</th><th>Name</th><th>Email</th><th>Phone</th><th>Primary Contact?</th>
</tr>
<apex:repeat var="ContactRole" value="{!relatedTo.OpportunityContactRoles}">
<tr>
<td>{!ContactRole.Role}</td>
<td>{!ContactRole.Contact.Name}</td>
<td>{!ContactRole.Contact.Email}</td>
<td>{!ContactRole.Contact.Phone}</td>
<td>{!ContactRole.IsPrimary}</td>
</tr>
</apex:repeat>
</table>
</p>

 

 Thanks in advance!

I want to build an Apex trigger to do something very simple.

 

We are using Eloqua for marketing automation and we have it integrated with SF.  I want to be able to build a view where within minutes of someone performing some activity - opening an e-mail, visiting our web site, clicking through a link, visiting a landing page, and/or submitting a form - we know it has happened almost immediately when we view the lead or contact in SF.

 

These activities are captured in Eloqua and passed to SF as a new activity.  Right now, we can only get acess to, and sort on, last activity date.  There is no way to sort based on last activity date AND time.  SF will not give us access to last activity time, even though it is captured and recorded by SF AND YOU CAN SEE IT IN LEADS AND CONTRACTS!!!

 

After weeks and weeks of back and forth with SF support, they tell us we need to build a trigger that will update a custom field when Eloqua sends an activity to SF ... 2 triggers probably, since we need to build one for a lead and one for a contact.

 

In other words, every time an activity is sent to a lead or contact in SF from Eloqua, we update a custom field with the date and time of that activity being created in SF.

 

A custom formula field will not work.

 

We don't have much experience (actually none at all) building Apex triggers, and this is likely the only one we'll need for a long while.  Does anyone have any sample code for doing something like this?  While inexperienced in Apex, we're good at taking plaguarized code and morphing it to our needs!  Ha!

 

Thanks!

 

-- Mark

Hi All,

 

I have a custom object and I try to create the following class but I cannot understand the error message, please help.

 

The custom object is called Qualification and the Lead record has a lookup field Qualification pointing to the Qualicaition record. The key of the Qualificaiton record is Name

 

 public with sharing class Controller_Qualification {

    public ApexPages.StandardController standardLeadController;
    
    public ApexPages.StandardController myQualificationController {get; set;}
    public Qualification qualification {get; set;}

    public Controller_Qualification(ApexPages.StandardControll?er cntrl) {
        
        standardLeadController = cntrl;
                
        Lead lead = (Lead)cntrl.getRecord();
        String qualificationName = lead.Qualificaiton;
        qualification = cache.load (Qualification.SObjectType, qualificationName);

        myQualificationController = new ApexPages.StandardController (qualification);
    }
}

 

Thanks,

Uri

  • March 03, 2013
  • Like
  • 0