如何在C#中使用颤振Salesforce的WSDL服务检索FeedComment [英] How to retrieve FeedComment using Chatter SalesForce WSDL service in C#

查看:127
本文介绍了如何在C#中使用颤振Salesforce的WSDL服务检索FeedComment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要找回Salesforce的颤振的新闻提要,我能够得到主力地位,但无法检索意见。是否有任何样品在C#中使用Salesforce的颤振WSDL API获得评论?

I have to retrieve News feed of salesforce chatter I am able to get main status but not able to retrieve comments. Is there any sample to get comments using SalesForce chatter WSDL API in c#?

推荐答案

您可以使用子查询的关系从新闻源给孩子FeedComments遍历。这里有一个SOQL查询,返回两个主体地位和评论给定用户的例子:

You can use child relationship queries to traverse from the NewsFeed to the child FeedComments. Here's an example of a SOQL query that returns both the main status and comments for a given user:

SELECT Id, Body, (Select Id, CommentBody FROM FeedComments) FROM NewsFeed WHERE ParentId = '00560000000wX0aAAE'

不确定的C#具体地,但它可能会返回FeedComments作为嵌套阵列。下面是顶点遍历结果的例子:

Not sure about C# specifically, but it will likely return the FeedComments as a nested array. Here's an example of iterating over the results in Apex:

NewsFeed nf = [SELECT Id, Body, (Select Id, CommentBody FROM FeedComments) FROM NewsFeed WHERE ParentId = '00560000000wX0aAAE'];

System.debug(nf.Id);
System.debug(nf.Body);
for (FeedComment fc : nf.FeedComments) {
   System.debug(fc.Id);
   System.debug(fc.CommentBody);
}

这篇关于如何在C#中使用颤振Salesforce的WSDL服务检索FeedComment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆