• rgdc
  • 10 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 6

Hi people,



When we create classes we need to make the test's class, and I would like know in what records are makes the tests? Where are they? Both in production and in homologation??


Thank you very much

  • October 19, 2011
  • Like
  • 0



I have a visualforce's page in console's page, and I wan't to give a refresh in subtab/frame . So I use the function:



sforce.console.refreshSubtabById(id:String, active:Boolean, (optional)callback:function)



And I want to know how I can to catch the Id the subtab.


Can anyone help me ?

  • October 07, 2011
  • Like
  • 0

Hello Guys,


I want to open page in visualForce when I press a button. When I press this button the page should to open in other page. So I will have 2 pages. I also want that this page be like a search's page, without to be a default page of SalesForce



Can anyone help me?



Thank you very much !!

  • October 03, 2011
  • Like
  • 0

I think the issue is the SOQL in the for statement, but I'm having issues trying to put this kind of SOQL Count in a map. I'm assuming some sort of mapping is required to get around my too many queries issue.


Can someone please point me in the right direction?



trigger StarRatingCampaign on CampaignMember (after insert)
Set<Id> leadId = new Set<Id>();

for (CampaignMember cm : trigger.new){leadId.add(cm.CampaignId);

Integer i = [SELECT count() FROM CampaignMember where CampaignId != '701C0000000ZFdA' and CampaignId=:Leadid and (Star_RatingF__c = '5' OR Star_RatingF__c = '4')];

Campaign newCampaign = new Campaign(id=cm.campaignid, Total_5_4_Star_Leads__c = i );
update newCampaign;}

Hello People,


I have the class:


global class Parcelamento {

     Webservice static String Parcela(String idOpp){
          return Parcelamento.ExecutarParcelamento(idOpp);

      public static String ExecutarParcelamento(String idOpp){ 




and my class test is:


private class testParcelamento {

     static testMethod void myUnitTest() {
         Parcelamento.ExecutarParcelamento([Select id from Opportunity limit 1].id);

And my error is:  Save error: Method does not exist or incorrect signature: Parcelamento.ExecutarParcelamento(Id)


Help me.


Thank you 



Hia All,

Can anyone please help me....


I am very new to salesforce. I am some doubts on triggers. Can anyone please give me some good documents to read triggers with examples.

Hi Created  below  trigger to update the order before insert and before delete.it is working fine for the before insert ,but  it is not working before delete . can any one please help to resolve the issue..


 trigger Recordsorder on St__c (before insert,before delete ){
if(Trigger.isInsert) {   Decimal recordOrder = Trigger.New[0].Ob__c;   

ID currentRecord =  Trigger.New[0].Id; 

 List<St__c> stt = new List<St__c>([Select Id,Or__c from St__c where  Ob__c  >=: recordOrder and Id<>: currentRecord  order by Ob__c ]); 

 Decimal order; 

 for(St_c s : stt)   {
    s.Ob__c = recordOrder + 1;       

   recordOrder  = recordOrder  + 1;   } 

 update stt ;
If (Trigger.isDelete){   Decimal recordOrder_old = Trigger.Old[0].Ob__c;   

ID currentRecord_old =  Trigger.Old[0].Id; 

 List<St__c> stt_old = new List<St__c>([Select Id,Ob__c from St__c where  Ob__c  >=: recordOrder_old and Id<>: currentRecord_old1  order by Ob__c ]); 

 Decimal order;   for(St__c s : stt_old) 

           s.Ob__c = recordOrder_old -1;   

       recordOrder  = recordOrder_old+1;   

 update stt_old ; 


Hi all:

  I was wondering if anyone knew how to format a number in VF so that it has a comma and decimal...

for example

40000 would be 40,000.00

So far I have this:


<apex:outputText value="{0}.{1}"> <apex:param value="{!SUBSTITUTE(TEXT(FLOOR(item.Unit_Price__c)), ',', '.' )}"/> <apex:param value="{!RIGHT(TEXT(ROUND((item.Unit_Price__c * 100), 2)),2)}"/> </apex:outputText>

 The second one gets the digits after the decimal. but the number shows up as 40000.00

How do I get the comma in there now...

Someone pleaseeee help with any ideas...