• MMA_FORCE
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 61
    Questions
  • 70
    Replies
Hi,
I have written this code to update Amount Field on Opportunity via trigger. The issue is I can see in the debug log that it is doing it correctly but on the opportunity the amount field does not change at all...
trigger Update_amount on Opportunity (before insert,before update) { 
  for (opportunity obj: trigger.new){ 
    obj.Amount = (obj.Total_Value__c*12)+ obj.Amount; 
    System.Debug('x'+ obj.Amount);
    System.Debug('y'+ obj.Total_Value__c);
    System.Debug('z'+ obj.Total_Value__c*12);
  } 
}

Its weird.... Any thoughts?
Thanks
Z

Hi everyone:

Here is a deal: (Salesforce Admin/Developer Part-time Available)

 

You give me the requirements, I do it for you based on those. I am quick and very efficient. Why pay 200 dollars an hour, trust me I am wayyy less then that and you will not be let down.

 

Check out my linked in profile:

www.linkedin.com/in/watchmefight/

 

Please email me if interested: choosepros@gmail.com

 

I have package options available as well.

Thanks

Zishan

Hi:

   How would one write a test class for aggregate result?

    public String getCustomers(String id){


    
    AggregateResult[] groupedResults = [SELECT Ownerid,Count(Id) ce 
                                        FROM Account 
                                        Where Owner.Level__c = 'AA' 
                                        AND Ownerid=:id AND CreatedDate = LAST_MONTH
                                        GROUP BY Ownerid]; 
                    
    queryResultscs = new List<customers>();
    
    for (AggregateResult ar : groupedResults)  {
        customers myObject = new customers();
        myObject.aaxCS = String.valueOf(ar.get('Ownerid'));
        AACSid =  myObject.aaxCS;
        myObject.TotalCS = (Integer) ar.get('ce');
        Customers = myObject.TotalCS ;
    
    queryResultscs.add(myObject); 
      
    }
    return null;    
    }                               

 Thanks

Z

Hi:

   How can I place this syntax into Apex Code:

<img src="/resource/Category_{!c.Name}" border="0" alt="{!c.Label}" title="{!c.Label}"/>

 To: Im getting the error: Error: Syntax error. Missing ')'

 <apex:image value="{!URLFOR($Resource.Category}+'_'+{!c.Name}" alt="{!c.Label}" title="{!c.Label}" />

 Thanks

 

Hi everyone:

   I have to write an outbound Message but the WSDL has to be specifically as the vendor wants it. So the original WSDL that SFDC creates within the outbound Message record does not fit the vendor needs. Does anyone know how to write a customize WSDL for Outbound Messaging?

Thanks

Z

Hi:

   the ownerid is not following thru on my opportunity clone functionality. Here is my Customize Clone button:

!URLFOR( $Action.Opportunity.Clone,Opportunity.Id, [cloneli=1,Owner=  Opportunity.OwnerId ,opp11='Open'],true)}

 I do see the Owner id fill in but once you hit save it makes the user who cloned the opportunity the owner.

Anyone know the correct syntax?

Thanks

 

Hi:

   I am getting duplicate ID's in my trigger when really there are no dups in my list???

Where am I going wrong:

 

trigger updateSubjectArea on Subject_Area_RQ__c (after insert,after update) {
 List<Subject_Area__c> htoUpdte = new List<Subject_Area__c>();
Subject_Area__c sa;
Set <ID> setOrderId = new set<ID>();
for (Subject_Area_RQ__c orderDetail :trigger.new) 
    {
    setOrderId.add(orderDetail.Subject_Area__c);
    }
 
List<Subject_Area__c> accounts = [SELECT Id FROM Subject_Area__c where Id IN :setOrderId];

for(Subject_Area_RQ__c sar : trigger.new){ 
for(Subject_Area__c a: accounts){
         a.SARQ__c = sar.On_Track_Subject_Area__c;
System.Debug('a.SARQ__c - ' +sar.On_Track_Subject_Area__c);
htoUpdte.add(a);
}
update htoUpdte; 
}
}

 

 

Hi all:

   I am trying to refresh my picklist when a value is selected.So here it is:

  1. Picklist Value ==> English, ELL, Math
  2. When user selects English, it refreshes the picklist and now the picklist values are ELL and Math and English is disabled.
  3. Then when user selects Math, it refreshes the picklist and now the picklist values is ELL and Math is disabled..

I have no idea how to do it... Here is my code:

 

<table border="0" id="theTable3" cellpadding="0" cellspacing="0" >
<tr>
<td>
<apex:outputLabel value="Advance Filter" for="theadvance"/><br/>
<apex:selectList value="{!theadvance}" size="1">
<apex:selectOption itemValue="Advance" itemLabel="Advance"/>
<apex:selectOption itemValue="English Proficiency" itemLabel="English Proficiency"/>
<apex:selectOption itemValue="Special Education" itemLabel="Special Education"/>

<apex:selectOption itemValue="Math" itemLabel="Math"/>
</apex:selectList>

</td>
<td>
<apex:outputPanel id="strackd" rendered="{!theadvance=='English Proficiency'}">

<apex:outputLabel value="English Proficiency"/>
<apex:selectList value="{!engname}" size="1" >
<apex:selectOption itemValue="ALL" itemLabel="Please Select a Value"/>
<apex:selectOption itemValue="1634: Fluent English Speaker" itemLabel="Fluent English Speaker"/>
<apex:selectOption itemValue="1633: Native English Speaker" itemLabel="Native English Speaker"/>
<apex:selectOption itemValue="1635: Non-English Speaking" itemLabel="Non-English Speaking"/>
<apex:selectOption itemValue="2349: Limited English Proficient/English Language Learner" itemLabel="Limited English Proficient/English Language Learner"/>
<apex:selectOption itemValue="1636: Redesignated As fluent English Proficient" itemLabel="Redesignated As fluent English Proficient"/>
<apex:selectOption itemValue="9997: Unknown" itemLabel="Unknown"/>

</apex:selectList>
</apex:outputPanel></td>
<td>
<apex:outputPanel id="strackdd" rendered="{!theadvance=='Special Education'}">
<apex:outputLabel for="spevalue" value="Special Education:" style="align:left"><apex:inputCheckbox id="spevalue" value="{!spevalue}" /></apex:outputLabel>
</apex:outputPanel></td></tr>
</table>

 Thanks

 

 

 

Message Edited by MMA_FORCE on 04-01-2010 08:00 AM

This error comes up sometimes, and sometimes it does not... When I refresh the screen, it worked, ... Can someone tell me how to fix my code so that it works all the time...

I am overriding the New Contact button on the Account side...

so from Account click new contact and this is the code pointing to it:

System.QueryException: List has no rows for assignment to SObject????

Class.OverrideNewContactExtension.<init>: line 10, column 17
External entry point
 

 

public class OverrideNewContactbutton {

Account a{get;set;}
boolean gotaccount=false;
public OverrideNewContactbutton(ApexPages.StandardController stdController){
string ret=ApexPages.currentPage().getParameters().get('RetURL');
ret=ret.substring(1,ret.length());
if(ret.startswith('001')){

a = [Select name,recordtype.name,id
from Account where id=:ret];
gotaccount=true;

}
}


public PageReference init() {
String redirectUrl = '';
String recordTypeId = System.currentPageReference().getParameters().get('RecordType');
Id parterProfileId = [SELECT Id FROM Profile WHERE Name ='donation User'].Id;

if (UserInfo.getProfileId() == parterProfileId) {
return null;
}
else {

if(gotaccount) {
redirectUrl = '/003/e?accid='+a.id+'&RecordType='+recordtypeId+'&nooverride=1';
}

else {
redirectUrl = '/003/e?nooverride=1';
}



}
PageReference newContact = new PageReference(redirectUrl);
return newContact;

}


public PageReference wizard() {

PageReference Wizard = new PageReference('/apex/testpage');
return Wizard;
}

 

 

 

Message Edited by MMA_FORCE on 03-29-2010 05:25 PM

I keep getting self reference errors and I do not know what to do anymore please help:

 

trigger updatesaandtermtrigger on Course_History__c (before insert, before update) { for (Course_History__c ch : Trigger.New){ updatech.updatecoursehistory(ch.Id, ch.Subject_Area__c,ch.GL_Term_Value__c); } } Public class updatech{ public static void updatecoursehistory(Id chid, String Subject, Decimal Term){ List<Subject_Area_RQ__c> sarq=new List<Subject_Area_RQ__c>([Select Id,GL_Term_Value__c FROM Subject_Area_RQ__c where GL_Term_Value__c=:Term and Subject_Area__r.Name=:Subject Limit 1] ); System.Debug('chid, Subject, Term - ' + chid + Subject + Term); System.Debug('GLTerm - ' + String.Valueof(sarq[0].GL_Term_Value__c)); System.Debug('Id - ' + sarq[0].Id); for(Course_History__c chi :[Select Term__c,Subject_Area_RQ__c from Course_History__c where id=:chid Limit 1]){ chi.Term__c = String.Valueof(sarq[0].GL_Term_Value__c); chi.Subject_Area_RQ__c= sarq[0].Id; update(chi); } } }

 

 

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger UpdateSARQ caused an unexpected exception, contact your administrator: UpdateSARQ: execution of AfterUpdate caused by: System.StringException: Invalid id: Subject_Area__r.Name: Trigger.UpdateSARQ: line 14, column 12

 

My Trigger:

 

trigger UpdateSARQ on Course_History__c (before insert,before update) {
List<Course_History__c> htoUpdte = new List<Course_History__c>();
Map<Id,String> rTypes = new Map<Id,String>();
Map<Id,Decimal> rTypes2 = new Map<Id,Decimal>();

for(Subject_Area_RQ__c rType :[SELECT Id,Subject_Area__r.Name,GL_Term_Value__c FROM Subject_Area_RQ__c]) {
rTypes.put(rType.Id,rType.Subject_Area__r.Name);
rTypes2.put(rType.Id,rType.GL_Term_Value__c);
}

for(Course_History__c ch: trigger.new)
{

if(rTypes.get('Subject_Area__r.Name')== ch.Subject_Area__c && rTypes2.get('GL_Term_Value__c')== ch.GL_Term_Value__c ){
ch.SARQ__c=rTypes.get('Id');
}

htoUpdte.add(ch);

}
}

 Please Help

Hi all:

   I have the following trigger which I need to update everytime a new or old update occurs:

I keep getting this error:

Compile Error: Incompatible key type String for MAP:smileyvery-happy:ecimal,Id at line 18 column 82

 

Now yes, Term is a decimal/formula field.... 

Also within my trigger I need to update a field that is a string but will update from the Term field...

Could someone shine some light on my error?? Please

 

trigger UpdateSARQ on Course (before insert, before update) {
List<Course> htoUpdte = new List<Course__c>();
Map<String, Id> rTypes = new Map<String, Id>();
Map<Decimal, Id> rTypes2 = new Map<Decimal, Id>();

for(Subject__c rType :[SELECT Id,Subject_Area__r.Name,Term__c FROM Subject__c]) {
rTypes.put(rType.Subject_Area__r.Name, rType.Id);
rTypes2.put(rType.Term__c, rType.Id);
}


Id oppRecType1 = rTypes.get('Subject_Area__r.Name');


for(Course__c ch: trigger.new)
{

if(rTypes.get('Subject_Area__r.Name')== ch.Subject__c && rTypes2.get('Term__c')== ch.Term__c){
ch.SARQ__c=rTypes.get('Id');
}

htoUpdte.add(ch);

}
}

Hi :

   If I have:

 

List<Decimal> rTypes2 = new List<Decimal>(); for(Account rType :[SELECT Term FROM Subject]) { rTypes2.add(rType.Term); } for(Account a:trigger.new){ if(rTypes2.get('Term') = 9.1) {} } I am getting an error on rTypes2.get('Term')?????

 

I am getting an error on rTypes2.get('Term')?????
 

 

Hi I need to increment decimals in my for loop but it is incrementing by 1...

 

for(Decimal zz=9.1;zz<9.4;zz++){ }

 It goes from 9.1 to 10 right away...

I need it to go from 9.1 to 9.2 to 9.3 to 9.4

 

Of course in my code the zz<9.4 will be a value from a list so something like student[0].term

Any suggestions on the incrementing?

 

 

 

HI:

   I have a variable Public String Terms;

I have about 4 Terms to a grade. So 9.1, 9.2, 9.3,9.4 and then 10.1, 10.2, 10.3 etc until 12th grade.

 

I wrote this for loop because I need to render outpanels by the Term

 

 

for(Integer z=1;z<5;z++){ for(Integer ii=9;ii<13;ii++){ Terms = Terms+ii+'.'+z; System.Debug('zTerms ' + Terms ); } }

 Of course I do not know if this is correct I do see the debug doing it:

9.110.111.112.19.210.211.212.29.310.311.312.39.410.411.412.4

 

 But I need to break it for each Term...

So in my VF Page I can say:

<apex:outputPanel rendered="{!Terms='9.2'}">

Is this correct?

Thanks

 

 

Hi:

   I have a link on a page that would take the user to another page. Now on that page I have a link that would return the user to the page they came from. 

That part works, but the page goes back to its original state which is a lookup form. 

I tried to place in apex:page cache="true"... But it still returns the page back to its original state.

 

I would like it to return the user back to there results on the page that they were viewing before hand.

 

Is this possible??

 

Thanks for your Help

Hi my header name goes away when I render the column but the value comes up???

 

<apex:column rendered="{!dd.TermD='9.2'}">
<apex:facet name="header">Subject Area</apex:facet>
<apex:outputText value="{!dd.Subject}"/>
</apex:column>

 

 Thanks

 

Message Edited by MMA_FORCE on 03-19-2010 11:07 AM

Hi:

 I am repeating this table over and over again based on Term. So if the term changes and it pertains to the contact then repeat it with the information.

Can someone tell me a better way to do this:

 

<table> <tr> <td colspan="4" align="center">Term: 9.1</td></tr><tr> <td align="center">Subject Area</td> <td align="center">Total Courses<br/>Taken</td> <td align="center">CR Min Pass</td> <td align="center">Credits Earned</td> <td align="center">Gap</td> </tr> <apex:repeat value="{!queryResultsD}" var="de"> <apex:outputPanel rendered="{!de.TermD='9.1'}"> <tr> <td>{!de.on_TrackD}</td> <td>{!de.nosa}</td> <td>{!de.MinPassD}</td> <td>{!de.CED}</td> <td>{!de.CED-de.MinPassD}</td> </tr> </apex:outputPanel> </apex:repeat> </table> </td> <td valign="top"> <table> <tr> <td colspan="4" align="center">Term:9.2</td></tr><tr> <td align="center">Subject Area</td> <td align="center">Total Courses<br/>Taken</td> <td align="center">CR Min Pass</td> <td align="center">Credits Earned</td> <td align="center">Gap</td> </tr> <apex:repeat value="{!queryResultsD}" var="de"> <apex:outputPanel rendered="{!de.TermD='9.2'}"> <tr> <td>{!de.on_TrackD}</td> <td>{!de.nosa}</td> <td>{!de.MinPassD}</td> <td>{!de.CED}</td> <td>{!de.CED-de.MinPassD}</td> </tr> </apex:outputPanel> </apex:repeat>

 Thanks

 

 

 

I have an aggregate query and it appears that it does not like my query in visualforce but apex controller accepts it..

The error I get on my VF page is:

field 'Term__c' can not be grouped in a query call

 

My Query is:

 

AggregateResult[] groupedResultsD = [SELECT SARQ__r.Subject__c,NLNS__SARQ__r.Term__c, SUM(Credits_Earned__c) ce,SUM(SARQ__r.Min_Pass__c)minpass FROM Course__c Where Student__c = :students[0].Student__c GROUP BY SARQ__r.Subject__c,SARQ__r.Term__c];

Term__c is a formula field in my Object....

Thanks

 

 

 

Hi all:

    I am not trying to write the record I am trying to spit it out on a repeat tag in a report in Visual Force...

Here is my Apex:

 

public List<Subject_Area_RQ__c> queryResults{ get; set; } // Get all the data in one query AggregateResult[] groupedResults = [SELECT On_Track_Subject_Area__c, GL_Term_Value__c, Grade_Level__c, SUM(NLNS__CR_Min_Pass__c) minpass FROM Subject_Area_RQ__c GROUP BY CUBE (On_Track_Subject_Area__c, GL_Term_Value__c, Grade_Level__c) ]; queryResults = new List<Subject_Area_RQ__c>(); // Loop through the query for (AggregateResult ar : groupedResults) { Subject_Area_RQ__c myObject=new Subject_Area_RQ__c(); myObject.On_Track_Subject_Area__c = String.valueOf(ar.get('On_Track_Subject_Area__c')); //MY ERROR IS HERE myObject.GL_Term_Value__c = (Decimal)ar.get('GL_Term_Value__c'); queryResults.add(myObject); }

 Is there any way to get passed this error???

Thanks

 

 

Hi:

   the ownerid is not following thru on my opportunity clone functionality. Here is my Customize Clone button:

!URLFOR( $Action.Opportunity.Clone,Opportunity.Id, [cloneli=1,Owner=  Opportunity.OwnerId ,opp11='Open'],true)}

 I do see the Owner id fill in but once you hit save it makes the user who cloned the opportunity the owner.

Anyone know the correct syntax?

Thanks

 

Hi:

   I am getting duplicate ID's in my trigger when really there are no dups in my list???

Where am I going wrong:

 

trigger updateSubjectArea on Subject_Area_RQ__c (after insert,after update) {
 List<Subject_Area__c> htoUpdte = new List<Subject_Area__c>();
Subject_Area__c sa;
Set <ID> setOrderId = new set<ID>();
for (Subject_Area_RQ__c orderDetail :trigger.new) 
    {
    setOrderId.add(orderDetail.Subject_Area__c);
    }
 
List<Subject_Area__c> accounts = [SELECT Id FROM Subject_Area__c where Id IN :setOrderId];

for(Subject_Area_RQ__c sar : trigger.new){ 
for(Subject_Area__c a: accounts){
         a.SARQ__c = sar.On_Track_Subject_Area__c;
System.Debug('a.SARQ__c - ' +sar.On_Track_Subject_Area__c);
htoUpdte.add(a);
}
update htoUpdte; 
}
}

 

 

Hi thank you firstlly for helping me out...

So I tried doing a simple bulk trigger... I keep getting this error

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger SARQ caused an unexpected exception, contact your administrator: SARQ: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id a0AA0000000MaYSMA0; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = a0AA0000000MaYS) is currently in trigger SARQ, therefore it cannot recursively update itself: []: Trigger.SARQ: line 22, column 1

 

Help please...

 

trigger SARQ on Subject_Area__c (before insert,before update) {
//Get Ids for Subject Area
Set<ID> said = new Set<ID>{};

for(Subject_Area__c hrr: trigger.new){

    said.add(hrr.Id);
}
System.Debug('said ' + said);
if(said!=null && said.size()>0){
//The ones to update
    List<Subject_Area__c> htoUpdte =  [select id from Subject_Area__c where ID in :said];
    
//The answer I need to update SA.SARQ in the SA object
    List<Subject_Area_RQ__c> SARQ = [SELECT On_Track_Subject_Area__c
                                      FROM Subject_Area_RQ__c where Subject_Area__c IN :said];
    
for (Subject_Area__c c: htoUpdte ){
System.debug('sarq ' + SARQ[0].On_Track_Subject_Area__c);
            c.SARQ__c = SARQ[0].On_Track_Subject_Area__c;

update htoUpdte ;

}
}
}

 I also tried this:

Trigger SARQ on Subject_Area__c (before insert,before update) {
List<Subject_Area__c> htoUpdte = new List<Subject_Area__c>();


Subject_Area__c sa = Trigger.new[0];
List<Subject_Area_RQ__c> SARQ = [SELECT On_Track_Subject_Area__c
FROM Subject_Area_RQ__c where Subject_Area__r.Name=:sa.Name];


for(Subject_Area__c hr: trigger.new)
{

If(SARQ.size()>0){
hr.SARQ__c = SARQ[0].On_Track_Subject_Area__c ;
htoUpdte.add(hr);
}
}

}

 

This error comes up sometimes, and sometimes it does not... When I refresh the screen, it worked, ... Can someone tell me how to fix my code so that it works all the time...

I am overriding the New Contact button on the Account side...

so from Account click new contact and this is the code pointing to it:

System.QueryException: List has no rows for assignment to SObject????

Class.OverrideNewContactExtension.<init>: line 10, column 17
External entry point
 

 

public class OverrideNewContactbutton {

Account a{get;set;}
boolean gotaccount=false;
public OverrideNewContactbutton(ApexPages.StandardController stdController){
string ret=ApexPages.currentPage().getParameters().get('RetURL');
ret=ret.substring(1,ret.length());
if(ret.startswith('001')){

a = [Select name,recordtype.name,id
from Account where id=:ret];
gotaccount=true;

}
}


public PageReference init() {
String redirectUrl = '';
String recordTypeId = System.currentPageReference().getParameters().get('RecordType');
Id parterProfileId = [SELECT Id FROM Profile WHERE Name ='donation User'].Id;

if (UserInfo.getProfileId() == parterProfileId) {
return null;
}
else {

if(gotaccount) {
redirectUrl = '/003/e?accid='+a.id+'&RecordType='+recordtypeId+'&nooverride=1';
}

else {
redirectUrl = '/003/e?nooverride=1';
}



}
PageReference newContact = new PageReference(redirectUrl);
return newContact;

}


public PageReference wizard() {

PageReference Wizard = new PageReference('/apex/testpage');
return Wizard;
}

 

 

 

Message Edited by MMA_FORCE on 03-29-2010 05:25 PM

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger UpdateSARQ caused an unexpected exception, contact your administrator: UpdateSARQ: execution of AfterUpdate caused by: System.StringException: Invalid id: Subject_Area__r.Name: Trigger.UpdateSARQ: line 14, column 12

 

My Trigger:

 

trigger UpdateSARQ on Course_History__c (before insert,before update) {
List<Course_History__c> htoUpdte = new List<Course_History__c>();
Map<Id,String> rTypes = new Map<Id,String>();
Map<Id,Decimal> rTypes2 = new Map<Id,Decimal>();

for(Subject_Area_RQ__c rType :[SELECT Id,Subject_Area__r.Name,GL_Term_Value__c FROM Subject_Area_RQ__c]) {
rTypes.put(rType.Id,rType.Subject_Area__r.Name);
rTypes2.put(rType.Id,rType.GL_Term_Value__c);
}

for(Course_History__c ch: trigger.new)
{

if(rTypes.get('Subject_Area__r.Name')== ch.Subject_Area__c && rTypes2.get('GL_Term_Value__c')== ch.GL_Term_Value__c ){
ch.SARQ__c=rTypes.get('Id');
}

htoUpdte.add(ch);

}
}

 Please Help

Hi :

   If I have:

 

List<Decimal> rTypes2 = new List<Decimal>(); for(Account rType :[SELECT Term FROM Subject]) { rTypes2.add(rType.Term); } for(Account a:trigger.new){ if(rTypes2.get('Term') = 9.1) {} } I am getting an error on rTypes2.get('Term')?????

 

I am getting an error on rTypes2.get('Term')?????
 

 

HI:

   I have a variable Public String Terms;

I have about 4 Terms to a grade. So 9.1, 9.2, 9.3,9.4 and then 10.1, 10.2, 10.3 etc until 12th grade.

 

I wrote this for loop because I need to render outpanels by the Term

 

 

for(Integer z=1;z<5;z++){ for(Integer ii=9;ii<13;ii++){ Terms = Terms+ii+'.'+z; System.Debug('zTerms ' + Terms ); } }

 Of course I do not know if this is correct I do see the debug doing it:

9.110.111.112.19.210.211.212.29.310.311.312.39.410.411.412.4

 

 But I need to break it for each Term...

So in my VF Page I can say:

<apex:outputPanel rendered="{!Terms='9.2'}">

Is this correct?

Thanks

 

 

Hi my header name goes away when I render the column but the value comes up???

 

<apex:column rendered="{!dd.TermD='9.2'}">
<apex:facet name="header">Subject Area</apex:facet>
<apex:outputText value="{!dd.Subject}"/>
</apex:column>

 

 Thanks

 

Message Edited by MMA_FORCE on 03-19-2010 11:07 AM

Hi:

 I am repeating this table over and over again based on Term. So if the term changes and it pertains to the contact then repeat it with the information.

Can someone tell me a better way to do this:

 

<table> <tr> <td colspan="4" align="center">Term: 9.1</td></tr><tr> <td align="center">Subject Area</td> <td align="center">Total Courses<br/>Taken</td> <td align="center">CR Min Pass</td> <td align="center">Credits Earned</td> <td align="center">Gap</td> </tr> <apex:repeat value="{!queryResultsD}" var="de"> <apex:outputPanel rendered="{!de.TermD='9.1'}"> <tr> <td>{!de.on_TrackD}</td> <td>{!de.nosa}</td> <td>{!de.MinPassD}</td> <td>{!de.CED}</td> <td>{!de.CED-de.MinPassD}</td> </tr> </apex:outputPanel> </apex:repeat> </table> </td> <td valign="top"> <table> <tr> <td colspan="4" align="center">Term:9.2</td></tr><tr> <td align="center">Subject Area</td> <td align="center">Total Courses<br/>Taken</td> <td align="center">CR Min Pass</td> <td align="center">Credits Earned</td> <td align="center">Gap</td> </tr> <apex:repeat value="{!queryResultsD}" var="de"> <apex:outputPanel rendered="{!de.TermD='9.2'}"> <tr> <td>{!de.on_TrackD}</td> <td>{!de.nosa}</td> <td>{!de.MinPassD}</td> <td>{!de.CED}</td> <td>{!de.CED-de.MinPassD}</td> </tr> </apex:outputPanel> </apex:repeat>

 Thanks

 

 

 

I'm trying to add fields via a trigger to a picklist that has existing fields.

 

If I have cities and it already has chicago, but this trigger now says put New York, how would this be completed?

 

I tried doing += and it did not work.

 

Thanks.

Hi all:

    I am not trying to write the record I am trying to spit it out on a repeat tag in a report in Visual Force...

Here is my Apex:

 

public List<Subject_Area_RQ__c> queryResults{ get; set; } // Get all the data in one query AggregateResult[] groupedResults = [SELECT On_Track_Subject_Area__c, GL_Term_Value__c, Grade_Level__c, SUM(NLNS__CR_Min_Pass__c) minpass FROM Subject_Area_RQ__c GROUP BY CUBE (On_Track_Subject_Area__c, GL_Term_Value__c, Grade_Level__c) ]; queryResults = new List<Subject_Area_RQ__c>(); // Loop through the query for (AggregateResult ar : groupedResults) { Subject_Area_RQ__c myObject=new Subject_Area_RQ__c(); myObject.On_Track_Subject_Area__c = String.valueOf(ar.get('On_Track_Subject_Area__c')); //MY ERROR IS HERE myObject.GL_Term_Value__c = (Decimal)ar.get('GL_Term_Value__c'); queryResults.add(myObject); }

 Is there any way to get passed this error???

Thanks

 

 

Hi:

   I have 2 links. I have 2 booleans to show or hide a form. Each link relates to a different part of the page.

 VF Page:

 

<apex:form id="menu"> <table border="0" cellspacing="0" cellpadding="0"> <tr><th> <apex:commandLink id="menustudent" value="Student" action="{!showform}" rerender="student"/> </th><th> <apex:commandLink id="menuteacher" value="Teacher" action="{!showform2}" rerender="teacher"/> </th></tr> </table> </apex:form> <apex:outputPanel id="stud" rendered="{!displaystudent}"> <apex:outputPanel layout="block" > <apex:form > blahblahblah </apex:form> <apex:outputPanel id="stud" rendered="{!displayteacher}"> <apex:outputPanel layout="block" > <apex:form > blahblahblah t </apex:form>

 Controller:

 

public boolean displaystudent {get; set;} public boolean displayteacher {get; set;} public void closeform() { displaystudent = false; displayteacher= false; } public void showform() { displaystudent = true; } public void showform2() { displayteacher= true; }

 It works when you click on it once but it does not hide the form when you click on another link. It brings both up and I do not know how to utilize my closeform command???

 

please help..

Thanks

 

 

 

 

Hi:

   I have a table that has a selectoption Picklist... and it is shown when a checkbox is true..

Now when you click off the checkbox , the picklist is hidden but the value stays in there as it was selected from the user....

 

Does anyone know a way to set the value of the picklist to a particular value if checkbox is not true????

 

Thanks 

Hi I am trying to create a return to previous Page link... and I do not have id's on my link in which they stay on the same Visual Force page name but it calls another page within it...

So I am trying to do this:

 

<apex:component > <apex:outputPanel rendered="{!$CurrentPage.parameters.apex}"> <a class="detailLink" href="/apex/MagicListView">Return To Previous Page</a> </apex:outputPanel> </apex:component>

 

 

 

Hi:

   I have a checkbox named advanceFilter and if checked would like an entire row to appear...

But somehow it is not working with my current statement :

 

<td>AdvanceFilter<input type="checkbox" name="AdvanceFilter" id="af"/></td> </tr> <tr><td> <input type="checkbox" name="AdvanceFilter" rendered="{!$Component.theform.AdvanceFilter='true'}"/> </td></tr>