• karthika
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi,

 

I am trying to frame an soql query to get all the child records of opportunity based on opportunity Division. How can I accomplish this

 

I have tried two options :

 

Option 1:

[Select o.x,o.y,o.z, o.Opportunity__r.Division, o.Opportunity__c, o.Name, o.Id From Opportunity_childObject__c o where Opportunity__r.Division  in (select id from Division where name='APJ') ];

I get an error saying  the left Operand Opportunity__r.Division  cannot have more than one level of relationships.

 

Option2:

 

Division divisionID= [select id from Division where name='APJ'];

[Select o.x,o.y,o.z o,o.Opportunity__r.Division, o.Opportunity__c, o.Name, o.Id From Opportunity_childObject__c o where Opportunity__r.Division = :divisionID ];

I get an error saying Invalid bind exception type of  Sobject:Division for column of type Id.

 

I have  also tried

Division divisionID= [select id from Division where name='APJ'];

[Select o.x,o.y,o.z o,o.Opportunity__r.Division, o.Opportunity__c, o.Name, o.Id From Opportunity_childObject__c o where Opportunity__r.Division = :divisionID.id ];

 

But no luck. It did not throw an error but was not returning any records

 

 Any help is  greatly appreciated.

 

Thanks

Hi All,

 

I have a strange issue. I have a SOQL query which is returning a single row of data if I run the query in the Salesforce Schema in Eclipse, but it is not returning any rows if I run the Query in the Apex class. I am not getting any rows and I get the exception:

 

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

 

Select Name, Id, BigMachines_Quote__r.Is_Primary__c, BigMachines_Quote__r.Id,q.BigMachines_Quote__c From Quote_Product__c q  where id='a2p50000000kDl4' 

 

Here BigMachines_Quote__c is the MAster and Quote_Product__c is teh child object. Any help is greatly appreciated.

 

Note: (I donot have the keyword with Sharing and the class is being executed in sytem mode, the reason for hardcoding the id is just  for testing purposes)

 

Thanks

Hi

 

I am writing an Apex class (local) that is not deployed to the server and wanted to test it before I deploy it. When I right click on the class--->Force.com server ---> Run tests, I am getting error from other classes and could not see the debug log from my class.

 

Is there any way wher I could turn off debugging other classes and run test only on the class written by me.

 

Any help would be greatly apprciated.

 

 

Thanks

Hi,

 

I am new to Salesforce and can you please let me know can we query the opportunity and get the email address of the opportunity owner.

 

It is urgent, any help would be appreciated.

 

Thanks

 

hi All,

 

I am trying to create opportunity from the records that I get from a staging table. For this to happen I need to create a intermediate custom object which acts as a place holder for the opp info. Once the custom object is created , I perfrom a search on account,contact and user obejcts with the values from staging table and associate them to the opportunity. Once an opp is created I update the  custom object with oppID, AccountId etc.

 

My question is how can I design a webservice call and how should the call be (Sync or Async) ? and should the  logic be  written in a Batch Apex.

 

I am new to Apex and your help would be greatly appreciated.

 

Karthika

 

 

Hi All,

 

I have a strange issue. I have a SOQL query which is returning a single row of data if I run the query in the Salesforce Schema in Eclipse, but it is not returning any rows if I run the Query in the Apex class. I am not getting any rows and I get the exception:

 

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

 

Select Name, Id, BigMachines_Quote__r.Is_Primary__c, BigMachines_Quote__r.Id,q.BigMachines_Quote__c From Quote_Product__c q  where id='a2p50000000kDl4' 

 

Here BigMachines_Quote__c is the MAster and Quote_Product__c is teh child object. Any help is greatly appreciated.

 

Note: (I donot have the keyword with Sharing and the class is being executed in sytem mode, the reason for hardcoding the id is just  for testing purposes)

 

Thanks