• usman
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies

Hi, I am trying following code from the Chatter workbook but it is throwing error below. Any suggestion?

 

 

private static void displayNewsFeed() throws Exception {

System.out.println("Querying for status updates...");

QueryResult queryResults = connection.query

("SELECT Id, Type, CreatedDate, CreatedBy.name, Body FROM NewsFeed WHERE Type= 'UserStatus' ORDER BY CreatedDate DESC, ID DESC LIMIT 10");

if (queryResults.getSize() > 0) {

for (SObject s : queryResults.getRecords()) {

System.out.println(s.getChild("NewsFeed").getField("Body") );

}

}

}

 

 

^

Exception in thread "main" [InvalidFieldFault [ApiQueryFault [ApiFault exceptionCode='INVALID_FIELD'

exceptionMessage='

CreatedDate, CreatedBy.name, Body FROM NewsFeed WHERE Type= 'UserStatus'

ERROR at Row:1:Column:47

No such column 'Body' on entity 'NewsFeed'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.'

]

row='1'

column='47'

]

]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(

Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at com.sforce.ws.bind.TypeMapper.readSingle(

TypeMapper.java:627)

at com.sforce.ws.bind.TypeMapper.readObject(

TypeMapper.java:504)

at com.sforce.ws.transport.SoapConnection.parseDetail(

SoapConnection.java:226)

at com.sforce.ws.transport.SoapConnection.createException(

SoapConnection.java:200)

at com.sforce.ws.transport.SoapConnection.receive(

SoapConnection.java:146)

at com.sforce.ws.transport.SoapConnection.send(

SoapConnection.java:98)

at com.sforce.soap.partner.PartnerConnection.query(

PartnerConnection.java:1158)

at com.developerforce.chatter.ChatterMain.displayNewsFeed(

ChatterMain.java:65)

at com.developerforce.chatter.ChatterMain.main(

ChatterMain.java:35)

 

 

 

 

 

 

 

 

 

  • August 12, 2011
  • Like
  • 0
can someone please explain why this login call fails with 'permission denied' message? i am using IE 6.0 browser. I got same message with FF 1.0.3
 
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?broswer=true" type="text/javascript">
</script>
<script language="JavaScript">
alert("1");
sforceClient.init(null, null, true);
alert("2");
var username = "admin@xyz.com";
var password = "testing";

alert(sforceClient.login(username, password));

</script>
  • July 26, 2006
  • Like
  • 0
Formula Field's HYPERLINK fuction always launch a popup window. Is it possible not a launch a popup window and instead display html page in the right pane of Salesforce.com UI with the sidebar intact?
 
thanks.   
  • April 18, 2006
  • Like
  • 0

My select query against Event entity gives following error:

OPERATION_TOO_LARGE: Operation effected too many rows.

Has anyone seen this message before. What is the resolution?

How do i findout record count for records in entity object?

Thanks,

 

 

 

  • August 18, 2005
  • Like
  • 0

It is possible to send email notification vai API for a newly created task.

M. Uppal

  • June 17, 2005
  • Like
  • 0

Where can i get technical notes on how to implemented compression in JAVA for salesforce.com API calls?

-usman

  • April 28, 2005
  • Like
  • 0
Hi,
I downloaded eclipse and install ajax toolkit.  I am following a movie from "http://adnsandbox.com/appexchange/updates/"

When I tried to create appExchange project I got the following error.

File container must not exist.

I am not sure why.  Does anyone have this error?

NOTE:
I have eclips 3.1.2.

Thanks.
-ann
  • January 03, 2007
  • Like
  • 0
Hello,
I am trying to connect to Salesforce using BizTalk.  I can login without any problems however I need to set the URL returned from the LoginResults.  Does anyone know how to do this?
 
Thanks,
Donna
 
can someone please explain why this login call fails with 'permission denied' message? i am using IE 6.0 browser. I got same message with FF 1.0.3
 
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?broswer=true" type="text/javascript">
</script>
<script language="JavaScript">
alert("1");
sforceClient.init(null, null, true);
alert("2");
var username = "admin@xyz.com";
var password = "testing";

alert(sforceClient.login(username, password));

</script>
  • July 26, 2006
  • Like
  • 0