• SFDC Rocks
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 1
    Replies

Using the Chatter REST API from Apex... when I request feed items for a case record using Apex code that looks like the below...

 

Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint(this.server +  '/services/data/v23.0/chatter/feeds/record/' + caseId + '/feed-items');
request.setMethod('GET');
request.setHeader('Authorization', 'OAuth ' + this.sessionId);
HttpResponse response = http.send(request);

 

In the JSON results, I am only getting the last page of the feed items and the nextPageUrl is always null.

 

If I append a '&pageSize=100' to the URL then I can get all of the feed items up to 100, but again I only get 1 page of results.

 

In one of my requests, I actually saw the "nextPageUrl' having a non-null value: this was once when I was not using the pageSize URL parameter, but it was intermittent.  Not sure why it showed me a value for just one call.

 

What I want to do is to be able to make multiple requests to get the first page, and then the second page, etc.

 

Does anyone have an example of Apex code that should work?  Or any clues on what I might be doing wrong?

 

If I am using the partner WSDL (if it matters), for a single SOQL query via the WS API, what is the maximum number of records I can query if I use query + multiple querymore calls?

 

Is it 10000 records?

 

 

 

When the below Apex code executes, I receive the below error message.  If I comment out the two " setSaveAsActivity" lines, I don't get this error message.   I cannot recall the history for why this Apex code is written this way, but do I need to be making these mail.setSaveAsActivity(false) calls?

 

===

 

ERROR MESSAGE:

 

internal error [SendEmail failed. First exception on row 1; first error: INVALID_FIELD_WHEN_USING_TEMPLATE, When a template is specified the plain text body, html body and subject may not be specified ].

 

===

CODE:

 

            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

                       

            mail.setTemplateId(templateId);

            mail.setWhatId(vaId);

            mail.setSaveAsActivity(false);

            mail.setUseSignature(true);

            mail.setSenderDisplayName(System.Label.EmailSenderDisplayName);

            mail.setSaveAsActivity(false);

           

            List<Messaging.SingleEmailMessage> messages = new List<Messaging.SingleEmailMessage>();

           

            for (Id recipient:recipients)

            {

                mail.setTargetObjectId(recipient);

                messages.add(mail);

            }

           

            Messaging.sendEmail(messages);

 

===

For the sidebar search feature there is a picklist to select what to search.  Today, the values are not sorted.  Is there anyway to sort the list of values?
 
I use a custom object that I am using to map the following two fields, let's call this mapping custom object "EFMAP":
 
field 1: a master-detail relationship with a custom object called "sentity"
 
field 2: a lookup relationship with a custom object called "sfield"
 
For sfield's view page, I want to have a related list to the "sentity" objects that it maps to.
 
I've been trying different things, and I keep getting errors about the relationship being wrong.
 
Can anyone provide any insight into how I should specify this in my apex page?
 
 <apex:relatedList list="???"/>
 
 
I built a similar page using Setup, and in the layout XML, it states
 
    <relatedLists>
        <fields>OBJECT_ID</fields>
        <fields>sentity__c</fields>
        <relatedList>EFMAP.sfield__c</relatedList>
    </relatedLists>
 
For a custom object, is there a built-in action I can specify within a command button to get a "Save & New" button?
 
<apex:commandButton value="Save" action="{!Save}"/>
 
For a text field on one of my screens, I want to display a warning message anytime the user changes the field's value so that they are definitely sensitive to the impact of changing the value.

Is there an easy way to add a warning dialog box as part of a custom field's on-change event for a screen created using Force.com Builder (setup UI)?
 
What I want to do is create a Visualforce page that allows the end-user to

1) select one more Salesforce users using the listViews component

2) and then perform an action on the selected users, such as sign them up for a company event.
 
When I tried to do this, I encountered a few technical issues
 
a) when using the listViews component with the standard user object, I cannot define custom buttons, and there are no default buttons, and so no action buttons appear in the Visualforce listViews component
 
b) for the standard user object, when I use the listViews component, no checkboxes appear in the left-hand action column


Does anybody have a suggestion for the best way to implement this functionality?



I use a custom object that I am using to map the following two fields, let's call this mapping custom object "EFMAP":
 
field 1: a master-detail relationship with a custom object called "sentity"
 
field 2: a lookup relationship with a custom object called "sfield"
 
For sfield's view page, I want to have a related list to the "sentity" objects that it maps to.
 
I've been trying different things, and I keep getting errors about the relationship being wrong.
 
Can anyone provide any insight into how I should specify this in my apex page?
 
 <apex:relatedList list="???"/>
 
 
I built a similar page using Setup, and in the layout XML, it states
 
    <relatedLists>
        <fields>OBJECT_ID</fields>
        <fields>sentity__c</fields>
        <relatedList>EFMAP.sfield__c</relatedList>
    </relatedLists>