• Reece
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I am trying to loop through a list of team members on an opportunity and am having troubles. Here's the piece that isn't working how I need it to:

 

        for (Opportunity opp : tNewMap.values()) {

 

//This code section works, but obviously really bad for bulk loads

                List<OpportunityTeamMember> oppMembers = [SELECT UserId FROM OpportunityTeamMember WHERE OpportunityId =: opp.Id];      
                for (OpportunityTeamMember otm : oppMembers) {

 

 

//This doesn't work and I'm not sure why
                for (OpportunityTeamMember otm : opp.OpportunityTeamMembers) {

 

 

Any advice?

  • February 07, 2011
  • Like
  • 0

We are receiving complaints from our customers that they are receiving email messages from us with no body and no subject line. The problem cannot be consistently reproduced, but we suspect that it is a result of an exception happening during message composition. By configuring things so that an exception occurs during message composition, we have demonstrated that the system does, in fact, send out a blank email message when exceptions occur.

Salesforce basic support says that this (i.e. sending a blank email message) is not a bug. Furthermore, there seems to be no way to catch and handle the exception, no way of even detecting when it happens, unless a customer complains. Has anyone experienced a similar problem and found a way to handle it?

Details of our setup: Workflow rule on Opportunity, evaluated when a record is created, or when a record is edited and did not previously meet the rule criteria, triggers email alert. Alert uses Visualforce email template, which includes custom Visualforce components. 

I'm trying to show or hide a <tr> HTML tag inside an apex:repeat, but can't find a way where SFDC will save the code without error. Basically I'm building a table and want to start a new <tr> if a certain condition is met (item number mod 3 = 0, so create a new row when the table row has three cells). Attached is a simplifed example, but it shows what I'm trying to do.

 

Note: I can't use an apex:panelGroup because I have nested repeaters in each "column".

 

Thanks!

 

Controller:

public with sharing class TestBuildTable {
	public List<Integer> Ints {get;set;}
	
	public TestBuildTable() {
		this.Ints = new List<Integer>();
		for (Integer i=0; i<20; i++) {
			this.Ints.add(i);
		}
	}
}

 

VF page first try (fail):

<apex:page id="TestBuildTable" Controller="TestBuildTable">
  <table>
    <apex:repeat value="{!Ints}" var="int">
	  {!IF(MOD(int,3)==0,'<tr>',' ')}
	    <td>{!int} nested repeat here</td>
	  {!IF(MOD(int,3)==0,'</tr>',' ')}
	</apex:repeat>
  </table>
</apex:page>

 

VF page second try (fail):

<apex:page id="TestBuildTable" Controller="TestBuildTable">
  <table>
    <apex:repeat value="{!Ints}" var="int">
	  <apex:outputPanel rendered="{!MOD(int,3)==0}" layout="none"><tr></apex:outputPanel>
	    <td>{!int}</td>
	  <apex:outputPanel rendered="{!MOD(int,3)==0}" layout="none"></tr></apex:outputPanel>
	</apex:repeat>
  </table>
</apex:page>

 

The desired result is a table that looks like this:

1    2    3

4    5    6

7    8    9

10 11 12

13 14 15

I am trying to loop through a list of team members on an opportunity and am having troubles. Here's the piece that isn't working how I need it to:

 

        for (Opportunity opp : tNewMap.values()) {

 

//This code section works, but obviously really bad for bulk loads

                List<OpportunityTeamMember> oppMembers = [SELECT UserId FROM OpportunityTeamMember WHERE OpportunityId =: opp.Id];      
                for (OpportunityTeamMember otm : oppMembers) {

 

 

//This doesn't work and I'm not sure why
                for (OpportunityTeamMember otm : opp.OpportunityTeamMembers) {

 

 

Any advice?

  • February 07, 2011
  • Like
  • 0

Getting ready to deploy a new website in SiteFinity (.NET) and have been unsuccessful in getting our forms to work properly.

They function in that you can populate with data and it will successful submit and arrive at the return URL. But it appears that no data is flowing into my Campaigns or even into Leads period. 

 

My web to lead code is clean and functions exactly how it should when testing it externally (debug mode). Our code is pasted into an iFrame within each of our three forms. I have not removed the debug code from any of the web 2 lead code. I've never had an issue with it in the past. 

 

Question: Where/How do I begin to trouble shoot this? Is there additional or esoteric code I need for Sitefinity? I saw a post about adding some .asp code...

 

Thanks for your help!

 

I've visited this a couple times in the past but never quite got it figured out. Does anyone have a good example of updating an Opportunity field based upon a Task trigger? I need to change the value of a Opportunity pick list based on the Status of a related Task.

Thanks!