• mahi
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 31
    Questions
  • 19
    Replies
Hi All,
 
Suppose i add 5 new campaigns one after other to a lead through 'Add Campaign'  related list of that lead.
 
Could i know which campaign has been added last?
 
Thanks,
Mahi
  • January 09, 2008
  • Like
  • 0
Hi All,
 
what will be the limit of following array of CampaignMember:
 
CampaignMember [ ] countcamp=[select id,Lead.id,Lead.status,Lead.lead_internal_lead_status_pck__c,Lead.RecordTypeid,campaignid from campaignMember where campaignid in :CampIncountcamp];
 
Is it 1000?
 
Thanks,
Mahi
  • January 08, 2008
  • Like
  • 0
Hi All,
 
when i write
 
for(campaign camp : [SELECT Name, (SELECT id FROM tasks) FROM Campaign where name='1-ID-H-NAS-37']){
task [ ] l= camp.tasks;
 
}
 
no error is given but when i write
 
for(campaign camp : [SELECT Name, (SELECT id FROM leads) FROM Campaign where name='1-ID-H-NAS-37']){
lead[ ] l= camp.leads;
 
}
 
an error is thrown saying, "Invalid field leads for SObject Campaign"..
 
I checked in WSDL, both Leads and Tasks are present under Campaign object .
 
Could anybody please comment on it. why it is happening?
 
Thanks,
Mahi
  • January 07, 2008
  • Like
  • 0
hi all,
 
i write a simple query like campaign cg=[select name from campaign cg where name='test_mahesh' ]
then i can access field name of campaign from
 
string name= cg.name;
 
 
if i write a relationship query as below:

campaign[ ] camp=[select cg.name, (select ld.name from leads ld where rating='hot') from campaign cg where name='test_mahesh' limit 1];

 how should I access name fields for campaign and leads?

please help me......

thanks,

mahi

  • January 07, 2008
  • Like
  • 0
Hi all,
 
How can I use a set within a map or map within a map in a trigger?
 
Could anybody give pointers to some tutorials on maps and sets and their usage?
 
Thanks,
Mahi
  • January 05, 2008
  • Like
  • 0
Hi,
 
As per Apex guide, there is a limit of 100 SOQL inside anonymous block.
 
Can we use anonymous block with trigger?
 
Thanks,
mahi
  • January 03, 2008
  • Like
  • 0
Code:
trigger Ph1_calculatefieldLead on Lead (after update,after insert) {

//Lead [] le=Trigger.new;

Integer TotalPassToSales=0;
String LeadsViaCamapign='0125000000010WY';
String NonCampaginLeads='0125000000010WT';

for (Lead leLoop:Trigger.new){

 Integer CountCampaignPresent=[Select Count() from CampaignMember where LeadId=:leLoop.Id];
 
 //leLoop.adderror('e'+CountCampaignPresent);
 
 if(CountCampaignPresent==1){
 
  /* Select campaignid of linked Campaign */
  String LeadCampaignId=[Select CampaignId from CampaignMember where LeadId=:leLoop.Id].CampaignId;

  /* Select all LeadIds of Leads linked with a particular campaign */
  //CampaignMember [] LeadCampaignMember=[Select LeadId,CampaignId from CampaignMember where CampaignId=:LeadCampaignId];

  for(CampaignMember LeadCampaignMemberLoop:[Select LeadId,CampaignId from CampaignMember where CampaignId=:LeadCampaignId]){

   /* Check LeadId is not null */
   if(LeadCampaignMemberLoop.LeadId!=null){

    /* Select information about Lead linked with a particular Campaign*/
    Lead LeadCampaignLoop=[Select Status,lead_internal_lead_status_pck__c,RecordTypeid from Lead where id=:LeadCampaignMemberLoop.LeadId];

    /* Calculate Total Pass To Sales Leads */
    if(LeadCampaignLoop.Status=='Open - Passed to Sales' || LeadCampaignLoop.Status=='Closed - Accepted by Sales' || LeadCampaignLoop.Status=='Closed - Rejected by Sales' ){
     TotalPassToSales=TotalPassToSales+1;
     }
                }
}
/* Select campaign for Lead whose status is changed */
    Campaign camp=[select cam_tot_pass_to_sales_lead_num__c from campaign where id=:LeadCampaignId];

    /* Populating values into concerned fields of Campaign */
     camp.cam_tot_pass_to_sales_lead_num__c=TotalPassToSales;
               }
}

 hi all,
 
i tried to import 18 leads through data loader without any information about campaign.
i am getting error too many SOQL queries :21 at line ::::::Integer CountCampaignPresent=[Select Count() from CampaignMember where LeadId=:leLoop.Id] during after update . 
 
it is also saying 'data already exists' but no leads were present before importing.

please help me out.
 
regards,
mahi
  • January 02, 2008
  • Like
  • 0
hi all,
 
suppose i insert value 'mahi' in 'nickname' field in account object (custom field).
 
then upon changing name from 'mahi' to 'mahesh', 'before update' trigger fire. i used adderror statement to reflect nickname value.
 
there i got mahi, old value.
 
Could anyone help me?
  • December 19, 2007
  • Like
  • 0
hi all,
 
i have 2 triggers(1 before update, 1 after update) and 1 workflow  on campaign object.
 
could i know what would be order of execution?
 
i am getting error:CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
 
please help me out,
 
thanks,
mahi
 
  • December 19, 2007
  • Like
  • 0
hi all,
 
i need to refer parent campaign id. i am not able to find name for that like parent account can be reffered through 'ParentId' .
 
Cud anybody know how to access parent campaign?
 
please help me.
 
regards,
mahi
  • December 11, 2007
  • Like
  • 0
Code:
trigger deleteTempAcc on Account (after update) {

account acc=trigger.new[0];

account acctodelete=[select Oracle_Company_ID__c from account where id=:acc.id ];

if(acctodelete.Oracle_Company_ID__c==0)
delete acctodelete;

}

 
hi all,
 
i need to delete account when some field in it got updated.
 
in following example when oracle_company_id get updated, account should be deleted.
 
but i am getting error:: self_reference_from_trigger.
 
please help me out.
  • December 10, 2007
  • Like
  • 0
hi all,
 
can custom button be put on partner object?
 
i need to add s-control to send email to selected partner account.
 
thanks,
mahi
  • December 06, 2007
  • Like
  • 0
when i fill 10000 in any field that is of number(18,0) type, comma appears like 10,000.
how it can be removed? is there any setting within salesforce?
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
can any error message be displayed on edit page through s-control like displayed in case of triggers and validation rules?
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
can user be restricted from exiting edit page without saving?
 
means if user clicks on any other tab or link or button on page , an error message should appear.
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
can user be restricted from exiting edit page without saving?
 
means if user clicks on any other tab or link or button on page , an error message should appear.
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
can user be restricted from exiting edit page without saving?
 
means if user clicks on any other tab or link or button on page , an error message should appear.
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
i render user to edit page every time some condition is fulfilled. i need to make one picklist field on edit page - read only. can it be done by some method?
 
thanks,
mahi
  • December 04, 2007
  • Like
  • 0
 
hi all,
 
i used a s-control for controlling some functionality so that user is moved to edit page whenever condition is not fulfilled. it is working fine with save button but during click of 'cancel' button same result is obtained like page is refreshed and same error occurs again.
 
i used window.location.href="{!URLFOR($Action.Lead.Edit,Lead.Id,null,true)}"; for rendering user to edit page.
 
i need to cancel all operations and return to details view page on click of 'cancel' button .
 
please help me its urgent.
 
thanks,
mahi
  • December 04, 2007
  • Like
  • 0
hi all,
 
i need to update one field like 'status of lead' whenever a custom button 'change status' is clicked and to check other field that becomes mandatory after converting status like ' comments'. so problem is when button is clicked status conversion as well as mandatory field checking should be done one after the other.
 
so i applied a trigger so that when status is converted, 'comments' field get checked. but due to it status field dont get updated when comments field remains empty. page is rendered to edit page without updating 'status' field.
 
so what to do now. please help me out.
 
thanks,
mahi
  • December 04, 2007
  • Like
  • 0
I am trying to create a validation rule so that the firstname field in the contact record can not be saved if a quote(') character is entered.  Salesforce should prompt the user that the record can not be saved.

I have used both the "contains" function but I can not seem to get this to work.  What am i doing wrong? 

For example, these 3 examples should error out:

1.Jim'
2.O'hare
3. '
 
 
CONTAINS( "'", firstname )


Message Edited by bikla78 on 01-14-2008 04:25 PM

Message Edited by bikla78 on 01-14-2008 10:12 PM
I am not clear on how to deploy Apex from developer to a production org.

Specifically, I am looking at the following documentation....

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_code.htm

It appears that Apex Classes and triggers must be in a local directory on my machine to use the Ant tool (see understanding CompileAndTest and reference to basedir and the sample directory provided with the Ant download)

Am I supposed to copy them over from developer org to my local hard drive?

I would have thought that somwhere I would provide username/password for my developer org and another username/password for my production org and the system would deploy from developer to production. Seems like I only provide username/password for my production org and the ant tool expects the apex files to be on my local machine...


I've made some headway in creating a testmethod for my trigger that will populate a contacts Mobile phone and Phone2 on a newly created task.
However, I can't seem to figure out what to do to get my Test Coverage over 75% (It's currently 71%).

Does anything jump out that might indicate where issue (or most likely, issues) lie?

Trigger Code:
Code:
trigger Copy_Contact_Cell_and_Mobile_To_Task_Record on Task (after insert) 
{
Id ContactIDOnTheTask;
String contactCellNumber;
String contactPhone2;
    for (Task TReadOnly : Trigger.new)
if (TReadOnly.RecordTypeID == '012500000009Kbp')//Limit Code to only FID Tasks
 {//IfOpening
     {
        Task t = [select Id, WhoID from Task where Id = :TReadOnly.Id  limit 1]; //get ContactID
ContactIDOnTheTask= t.WhoID;
Contact[] phoneValueArray = [Select c.Id,c.mobilePhone,c.Phone_2__c from Contact c 
where c.Id = :ContactIDOnTheTask limit 1]; 
for(Integer i=0;i<phoneValueArray.size();i++)
   {//4
contactCellNumber = phoneValueArray[0].mobilePhone;  //grab mobile number from array
contactPhone2 = phoneValueArray[0].Phone_2__c;  //grab phone2 number from array
t.Mobile__c = contactCellNumber;  //set mobile custom field on task to the contact mobile number
t.Phone2__c = contactPhone2;  //set phone2 custom field on task to contact phone2 number
   }//4
  update t;
  }
 }//IfClosing
}

TestMethod:
Code:
public class taskTriggerTestMethod {//1

static testMethod void myTest() {//2
//Declare Variables
Id ContactIDOnTheTask;
String contactCellNumber ;
String contactCellNumber2 ;
String acontactPhoneNumber2;
String bcontactPhoneNumber2;
date taskydate = System.today();
 // Create two Tasks for test
   Task t1 = new task(ActivityDate = taskydate, OwnerId ='00530000000hxwA',   Results__c = 'Contact', Subject='Task1Test', WhoID = '0035000000RzAaw', RecordTypeID = '012500000009Kbp');
insert t1;
 
 Task t2 = new task(ActivityDate = taskydate, OwnerId ='00530000000hxwA', Results__c = 'Contact', Subject='Task2Test', WhoID = '0035000000RzAaw', RecordTypeID = '012500000009Kbp');
 insert t2;  


 //Grab Details From Task 1
 Task t = [select Id, WhoID, Mobile__c,Phone2__c from Task where Id = :t1.Id  limit 1]; //get ContactID


Contact[] phoneValueArray = [Select c.Id,c.mobilePhone,Phone2__c from Contact c 
where c.Id = :t.WhoID limit 1]; 
for(Integer i=0;i<phoneValueArray.size();i++)
   
acontactPhoneNumber2 = phoneValueArray[0].Phone2__c; //grab Phone 2 from array
contactCellNumber = phoneValueArray[0].mobilePhone;  //grab mobile number from array

  
//Grab Details From Task 2
Task t4 = [select Id, WhoID, Mobile__c,Phone2__c from Task where Id = :t2.Id  limit 1]; //get ContactID

Contact[] phoneValueArray2 = [Select c.Id,c.mobilePhone,Phone2__c from Contact c 
where c.Id = :t4.WhoID limit 1]; 
for(Integer i=0;i<phoneValueArray2.size();i++)
   
bcontactPhoneNumber2 = phoneValueArray2[0].Phone2__c;
contactCellNumber2 = phoneValueArray2[0].mobilePhone;  //grab mobile number from array
  
//Tests
  System.assert(t1.ID != NULL);
  System.assert(t2.ID != NULL);
  System.assertEquals(t1.Mobile__c,contactCellNumber);
  System.assertEquals(t2.Mobile__c,contactCellNumber2);
  System.assertEquals(t1.Phone2__c,acontactPhoneNumber2);
  System.assertEquals(t2.Phone2__c,bcontactPhoneNumber2);
 
 } 
}//1

 Debug Log:
Code:
*** Beginning Test 1: taskTriggerTestMethod.static testMethod void myTest()

20080108223753.034:Class.taskTriggerTestMethod.myTest: line 13, column 1: Insert: SOBJECT:Task
*** Beginning Copy_Contact_Cell_and_Mobile_To_Task_Record on Task trigger event bulk AfterInsert for 00T5000000dkDiT

20080108223753.087:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 6, column 5: SelectLoop:LIST:SOBJECT:Task
20080108223753.087:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 10, column 18: SOQL query with 1 row finished in 6 ms
20080108223753.087:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 12, column 29: SOQL query with 1 row finished in 4 ms
20080108223753.087:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 21, column 3: Update: SOBJECT:Task
20080108223753.087:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 21, column 3: DML Operation executed in 28 ms

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 2 out of 100
Number of query rows: 2 out of 500
Number of DML statements: 2 out of 100
Number of DML rows: 2 out of 500
Number of transaction control statements: 0 out of 0
Number of script statements: 20 out of 200000
Maximum heap size: 0 out of 500000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10

Total email recipients queued to be sent : 0
Static variables and sizes:
Copy_Contact_Cell_and_Mobile_To_Task_Record:ContactIDOnTheTask:18
Copy_Contact_Cell_and_Mobile_To_Task_Record:contactCellNumber:0
Copy_Contact_Cell_and_Mobile_To_Task_Record:contactPhone2:10


*** Ending Copy_Contact_Cell_and_Mobile_To_Task_Record on Task trigger event bulk AfterInsert for 00T5000000dkDiT

20080108223753.034:Class.taskTriggerTestMethod.myTest: line 13, column 1: DML Operation executed in 92 ms
20080108223753.034:Class.taskTriggerTestMethod.myTest: line 16, column 2: Insert: SOBJECT:Task
*** Beginning Copy_Contact_Cell_and_Mobile_To_Task_Record on Task trigger event bulk AfterInsert for 00T5000000dkDiU

20080108223753.155:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 6, column 5: SelectLoop:LIST:SOBJECT:Task
20080108223753.155:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 10, column 18: SOQL query with 1 row finished in 3 ms
20080108223753.155:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 12, column 29: SOQL query with 1 row finished in 5 ms
20080108223753.155:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 21, column 3: Update: SOBJECT:Task
20080108223753.155:Trigger.Copy_Contact_Cell_and_Mobile_To_Task_Record: line 21, column 3: DML Operation executed in 27 ms

Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 4 out of 100
Number of query rows: 4 out of 500
Number of DML statements: 4 out of 100
Number of DML rows: 4 out of 500
Number of transaction control statements: 0 out of 0
Number of script statements: 34 out of 200000
Maximum heap size: 0 out of 500000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10

Total email recipients queued to be sent : 0
Static variables and sizes:
Copy_Contact_Cell_and_Mobile_To_Task_Record:ContactIDOnTheTask:18
Copy_Contact_Cell_and_Mobile_To_Task_Record:contactCellNumber:0
Copy_Contact_Cell_and_Mobile_To_Task_Record:contactPhone2:10


*** Ending Copy_Contact_Cell_and_Mobile_To_Task_Record on Task trigger event bulk AfterInsert for 00T5000000dkDiU

20080108223753.034:Class.taskTriggerTestMethod.myTest: line 16, column 2: DML Operation executed in 63 ms
20080108223753.034:Class.taskTriggerTestMethod.myTest: line 20, column 11: SOQL query with 1 row finished in 3 ms
20080108223753.034:Class.taskTriggerTestMethod.myTest: line 23, column 29: SOQL query with 1 row finished in 6 ms
20080108223753.034:Class.taskTriggerTestMethod.myTest: line 32, column 11: SOQL query with 1 row finished in 3 ms
20080108223753.034:Class.taskTriggerTestMethod.myTest: line 34, column 30: SOQL query with 1 row finished in 6 ms
System.Exception: Assertion Failed: Expected: null, Actual: 1234567890

Class.taskTriggerTestMethod.myTest: line 46, column 3


Cumulative resource usage:

Resource usage for namespace: (default)
Number of SOQL queries: 8 out of 100
Number of query rows: 8 out of 500
Number of DML statements: 4 out of 100
Number of DML rows: 4 out of 500
Number of transaction control statements: 0 out of 0
Number of script statements: 49 out of 200000
Maximum heap size: 0 out of 500000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10

Total email recipients queued to be sent : 0
Stack frame variables and sizes:
Frame0

*** Ending Test taskTriggerTestMethod.static testMethod void myTest()

 


 


  • January 08, 2008
  • Like
  • 0
Hi All,
 
what will be the limit of following array of CampaignMember:
 
CampaignMember [ ] countcamp=[select id,Lead.id,Lead.status,Lead.lead_internal_lead_status_pck__c,Lead.RecordTypeid,campaignid from campaignMember where campaignid in :CampIncountcamp];
 
Is it 1000?
 
Thanks,
Mahi
  • January 08, 2008
  • Like
  • 0
Hi,
 
I was just wondering why the following code might not work? I'm working through eclipse; which isn't reporting an error, but when I check my account it hasn't been uploaded. When I remove the offending code everything compiles fine and I can see it in my force account.
 
Code:
[Select l.Boat__c, l.List_Price__c, l.Listing_Type__c, l.Name, l.RecordTypeId from Listing_Details__c l where l.boat__c =:myBoat AND l.RecordTypeId = 'foo'].List_Price__c);

 
myBoat is a string that holds the id.
 
Thanks for any help.
Hi all,
 
How can I use a set within a map or map within a map in a trigger?
 
Could anybody give pointers to some tutorials on maps and sets and their usage?
 
Thanks,
Mahi
  • January 05, 2008
  • Like
  • 0
Code:
trigger Ph1_calculatefieldLead on Lead (after update,after insert) {

//Lead [] le=Trigger.new;

Integer TotalPassToSales=0;
String LeadsViaCamapign='0125000000010WY';
String NonCampaginLeads='0125000000010WT';

for (Lead leLoop:Trigger.new){

 Integer CountCampaignPresent=[Select Count() from CampaignMember where LeadId=:leLoop.Id];
 
 //leLoop.adderror('e'+CountCampaignPresent);
 
 if(CountCampaignPresent==1){
 
  /* Select campaignid of linked Campaign */
  String LeadCampaignId=[Select CampaignId from CampaignMember where LeadId=:leLoop.Id].CampaignId;

  /* Select all LeadIds of Leads linked with a particular campaign */
  //CampaignMember [] LeadCampaignMember=[Select LeadId,CampaignId from CampaignMember where CampaignId=:LeadCampaignId];

  for(CampaignMember LeadCampaignMemberLoop:[Select LeadId,CampaignId from CampaignMember where CampaignId=:LeadCampaignId]){

   /* Check LeadId is not null */
   if(LeadCampaignMemberLoop.LeadId!=null){

    /* Select information about Lead linked with a particular Campaign*/
    Lead LeadCampaignLoop=[Select Status,lead_internal_lead_status_pck__c,RecordTypeid from Lead where id=:LeadCampaignMemberLoop.LeadId];

    /* Calculate Total Pass To Sales Leads */
    if(LeadCampaignLoop.Status=='Open - Passed to Sales' || LeadCampaignLoop.Status=='Closed - Accepted by Sales' || LeadCampaignLoop.Status=='Closed - Rejected by Sales' ){
     TotalPassToSales=TotalPassToSales+1;
     }
                }
}
/* Select campaign for Lead whose status is changed */
    Campaign camp=[select cam_tot_pass_to_sales_lead_num__c from campaign where id=:LeadCampaignId];

    /* Populating values into concerned fields of Campaign */
     camp.cam_tot_pass_to_sales_lead_num__c=TotalPassToSales;
               }
}

 hi all,
 
i tried to import 18 leads through data loader without any information about campaign.
i am getting error too many SOQL queries :21 at line ::::::Integer CountCampaignPresent=[Select Count() from CampaignMember where LeadId=:leLoop.Id] during after update . 
 
it is also saying 'data already exists' but no leads were present before importing.

please help me out.
 
regards,
mahi
  • January 02, 2008
  • Like
  • 0
hi all,
 
suppose i insert value 'mahi' in 'nickname' field in account object (custom field).
 
then upon changing name from 'mahi' to 'mahesh', 'before update' trigger fire. i used adderror statement to reflect nickname value.
 
there i got mahi, old value.
 
Could anyone help me?
  • December 19, 2007
  • Like
  • 0
hi all,
 
i have 2 triggers(1 before update, 1 after update) and 1 workflow  on campaign object.
 
could i know what would be order of execution?
 
i am getting error:CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
 
please help me out,
 
thanks,
mahi
 
  • December 19, 2007
  • Like
  • 0
I've deployed all my triggers and classes to a full sandbox (structure and data) without any problems.  All my tests create their own test objects/data so it doesn't rely on instance data.  This one in particular uses two hardcoded users that exists in all instances but since I'm creating the test accounts any existing data should not interfere with the queries.

Yet when I try to deploy to our production instance I get a "too many query rows: 501" error on this line:


Code:
System.assertEquals(60, [SELECT COUNT() FROM SFDC_Assignment__c WHERE Account__c IN :oAccounts AND OwnerId = :oOriginalUser.Id AND Resource__c = :oOriginalUserResource.Id]);

 Is this error saying that too many rows are being returned?  The documentation says that 1,000 is the max number of records that can be retrieved through a query but it's flagging it on 501 and this is a COUNT() query so it shouldn't matter.


Message Edited by kpeterson on 12-12-2007 06:30 AM
when i fill 10000 in any field that is of number(18,0) type, comma appears like 10,000.
how it can be removed? is there any setting within salesforce?
 
thanks,
mahi
  • December 05, 2007
  • Like
  • 0
hi all,
 
is there any method by which we can send email with cc and bcc field?
 
i looked into workflow-> email alert but no cc and bcc options were given.
 
please help me its urgent.
 
thanks,
mahi
  • November 15, 2007
  • Like
  • 0
hi,
 
can we call an api function inside trigger?
 
for eg. i create a class and use api calls there and call that class inside trigger.
 
please help me out.
 
thanks,
mahi
  • November 14, 2007
  • Like
  • 0
hi all,
 
i have written a query::
 
campaign[ ] camp=[select cg.name, (select ld.count() from leads ld where rating='hot') from campaign cg where name='test_mahesh' limit 1];
 
i am not sure whether its right or not.
 
if right then how can i access count() field inside this relationship query. please help me out.
 
thanks,
 
mahi
  • November 08, 2007
  • Like
  • 0
hi All,
 
i am getting 'maximum trigger depth exceeded' error while inserting new account through trigger.
 
i am using developer account.
 
cud anybody help me out?
 
thanks,
Mahi
  • November 01, 2007
  • Like
  • 0
Expected Revenue is read-only field displayed only after creating an opportunity. i guess it is calculated from multiplication of Amount and Percentage fields (displayed in page layout).
my problem is no validation rule is working upon this field (Expected Revenue).
for eg. i put ExpectedRevenue < 10000 in validation rule but it always fails.
please help me out.
 
thanks,
Mahesh
  • October 30, 2007
  • Like
  • 0