• dong
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
Hi  all,
   I have the following SOQL  (Just for example)
 
SELECT Account.Name, (SELECT Contact.FirstName, Contact.LastName FROM Account.Contacts where firstname='Mark') FROM Account 
 
However, the result is :  the  clause   where firstname='Mark'  doesn't work.
 
why?    if I want to get the result , that is , I want to find contact Mark's account name, what shall I do ?
 
This is my real SOQL in project :
select  id ,owner.userrole.name , (select Overall_satisfaction__c  from feedback__r where    survey_received__c = last_week) from  case where case.recordType.name != 'CRM4SRF' and case.recordType.name !='RFE' and case.owner.userrole.name ='APAC Support Services Engineer'  
But I found  survey_received__c = last_week , doesn' work!!
 
 
  • June 24, 2008
  • Like
  • 0
Hi  All,
    I want to translate the following SQL into SOQL  , is it possible?  For example:
 
    Table: Test1
     column1      column2   column3
      s1                  90                 4
      s1                  100                5
      s2                   60                 3
      s2                   30                 2
     
SQL :  select  sum(column3),avg(column2) from Test1 group by  column1
 
What the  SOQL is ?  Is there a SOQL  in salesforce?
 
Thank you!!
 
 
 
 
 
 
  • June 23, 2008
  • Like
  • 0
Hi  All,
   I met a SOQL query error ,  Who could tell me why?
 The case is , I  can  retrieve data from sforce explore by the following SOQL :
 
select case.owner.name, case.owner.userRole.name ,subject, status ,origin ,reason,  
           caseNumber,product_family__c,createdDate from case  limit 20
 
So , I use the following code to send my query.
 
  QueryResult qr =
             binding.query(               
               "select case.owner.name, case.owner.userRole.name ,subject, status ,origin ,reason,  " +
               "caseNumber,product_family__c,createdDate from case  limit 20 ");
However, the  error message is :
 
Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject._case - Product_Family__c
 at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
 at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
 at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
 at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 at org.apache.axis.client.Call.invoke(Call.java:2467)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java:3222)
 at org.salesforce.quickstart.Samples.querySample(Samples.java:287)
 at org.salesforce.quickstart.Samples.run(Samples.java:343)
 at org.salesforce.quickstart.Samples.main(Samples.java:38)
Exception in thread "main" AxisFault
...................................................................................................................................................................
If I delete Product_Family__c  in my SOQL, the query is OK. So what shall I do  if  I  still want to get  Product_Family__c   field's  value back from salesforce?     
 
 
 
  • June 16, 2008
  • Like
  • 0
Hi all,
  I want to get the result  of  report programmatically by salesforce API , Namely, I have to translate the filters that set manually in salesforce into sql , and then send query to get result.   Now I can use dataloader to connect salesforce and see the tables there. However, I don't know what each field represents for ?   For example, one of my reports has the following filters:
 

1. Case Record Type not equal to RFE,CRM4SRF   

2. Case Owner Role starts with US Support Services 

 
How Can I find which field represents  record type(String type) and which field represents Owner Role ? 
Any good solutions?   Thank you !!
  • June 07, 2008
  • Like
  • 0
Hi all,
   Today  I tried to use the following code to retrieve all the data in case table.
 
 QueryResult qr = binding.queryAll("select *  from Case");
 
The result is :  NULLPointerException.
 
 how can I retrieve all the data from case? 
 
Another question is : com.sforce.soap.enterprise.sobject._case, does this class for the following use?
 
QueryResult qr = binding.queryAll("select ??  from Case");
 for (int i = 0; i < qr.getRecords().length; i++)
  _case c = (_case) qr.getRecords(i);
 
..................................................................
 
 
 
 
  • June 06, 2008
  • Like
  • 0
Hi All,
   I want to get the data out of salesforce and process them for my own. how could I know which data located in which table?
Is is possible for me to get a view of those data? such as we use pl/sql to connect Oracle.
Thank you!!
 
 
 
 
  • June 05, 2008
  • Like
  • 0
My boss gave me a task to automate weekly salesforce reports in java. I am quite new to salesforce, I am also new to salesforce development. Can I finished my task just by salesforce API for java?  Do I have to master Apex language?
what the deferences between Apex language and  salesforce API for java?   Any skilled developers give me some suggestions?
Appreciate it!! 
 
  • June 04, 2008
  • Like
  • 0
I am quite new to salesforce development.  I wonder if salesforce provides API for java ?  Namely, it provides some jar files which I can add them into project build path, and then  I can call some method by this API ?  
  • June 02, 2008
  • Like
  • 0
Hi  all,
   I have the following SOQL  (Just for example)
 
SELECT Account.Name, (SELECT Contact.FirstName, Contact.LastName FROM Account.Contacts where firstname='Mark') FROM Account 
 
However, the result is :  the  clause   where firstname='Mark'  doesn't work.
 
why?    if I want to get the result , that is , I want to find contact Mark's account name, what shall I do ?
 
This is my real SOQL in project :
select  id ,owner.userrole.name , (select Overall_satisfaction__c  from feedback__r where    survey_received__c = last_week) from  case where case.recordType.name != 'CRM4SRF' and case.recordType.name !='RFE' and case.owner.userrole.name ='APAC Support Services Engineer'  
But I found  survey_received__c = last_week , doesn' work!!
 
 
  • June 24, 2008
  • Like
  • 0
Hi  All,
   I met a SOQL query error ,  Who could tell me why?
 The case is , I  can  retrieve data from sforce explore by the following SOQL :
 
select case.owner.name, case.owner.userRole.name ,subject, status ,origin ,reason,  
           caseNumber,product_family__c,createdDate from case  limit 20
 
So , I use the following code to send my query.
 
  QueryResult qr =
             binding.query(               
               "select case.owner.name, case.owner.userRole.name ,subject, status ,origin ,reason,  " +
               "caseNumber,product_family__c,createdDate from case  limit 20 ");
However, the  error message is :
 
Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject._case - Product_Family__c
 at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
 at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
 at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
 at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 at org.apache.axis.client.Call.invoke(Call.java:2467)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java:3222)
 at org.salesforce.quickstart.Samples.querySample(Samples.java:287)
 at org.salesforce.quickstart.Samples.run(Samples.java:343)
 at org.salesforce.quickstart.Samples.main(Samples.java:38)
Exception in thread "main" AxisFault
...................................................................................................................................................................
If I delete Product_Family__c  in my SOQL, the query is OK. So what shall I do  if  I  still want to get  Product_Family__c   field's  value back from salesforce?     
 
 
 
  • June 16, 2008
  • Like
  • 0
Hi all,
  I want to get the result  of  report programmatically by salesforce API , Namely, I have to translate the filters that set manually in salesforce into sql , and then send query to get result.   Now I can use dataloader to connect salesforce and see the tables there. However, I don't know what each field represents for ?   For example, one of my reports has the following filters:
 

1. Case Record Type not equal to RFE,CRM4SRF   

2. Case Owner Role starts with US Support Services 

 
How Can I find which field represents  record type(String type) and which field represents Owner Role ? 
Any good solutions?   Thank you !!
  • June 07, 2008
  • Like
  • 0
Hi all,
   Today  I tried to use the following code to retrieve all the data in case table.
 
 QueryResult qr = binding.queryAll("select *  from Case");
 
The result is :  NULLPointerException.
 
 how can I retrieve all the data from case? 
 
Another question is : com.sforce.soap.enterprise.sobject._case, does this class for the following use?
 
QueryResult qr = binding.queryAll("select ??  from Case");
 for (int i = 0; i < qr.getRecords().length; i++)
  _case c = (_case) qr.getRecords(i);
 
..................................................................
 
 
 
 
  • June 06, 2008
  • Like
  • 0
Hi All,
   I want to get the data out of salesforce and process them for my own. how could I know which data located in which table?
Is is possible for me to get a view of those data? such as we use pl/sql to connect Oracle.
Thank you!!
 
 
 
 
  • June 05, 2008
  • Like
  • 0
I am quite new to salesforce development.  I wonder if salesforce provides API for java ?  Namely, it provides some jar files which I can add them into project build path, and then  I can call some method by this API ?  
  • June 02, 2008
  • Like
  • 0