• May the Vforce be with you
  • 0 Points
  • Member since 2013

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

Hi all. I'm having a problem accessing the REST API from a VF page. Basically, the request performs OK, except for the parameters, which are not being set/do not arrive on the endpoint.


I'm using forcetk to avoid the cross domain issue. This is the relevant VF code:


<apex:page showHeader="false" sidebar="false" standardStylesheets="false">

    <apex:includeScript value="{!URLFOR($Resource.MyResource, 'jquery-1.9.1.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.MyResource, 'forcetk.js')}"/>
    <script type="text/javascript">
        $(document).ready(function() {

            var forceTKClient = new forcetk.Client();
                function(data, textStatus, jqXHR) {
                    console.log('SUCCESS - ' + data);
                function(jqXHR, textStatus, errorThrown) {
                    console.log('ERROR - ' + textStatus);


And this is the Apex controller for the REST resource:


global with sharing class MyRestResource {
    global static Map<String, String> doGet() {

        Map<String,String> res = new Map<String,String> {
            'received' => 'yes'
        return res;



My custom REST method is reached correctly, and the response from it is returned correctly, but the parameters do never get to my custom REST method. I.e., the response received on the JS callback is


{received: "yes"}

 whereas it should be


{received: "yes", myParameter: "myValue"}

Inspecting the request sent from the browser I see that the endpoint is





"myParameter" isn't present anywhere on the browser request.


Any hint?


Thanks in advance,




Helo All,

I would like to know if there's way to load Home Page Components in the Standard Console Tab's sidebar?

As far as we know, the console tab's side bar display only the 'Recent Items' & 'Recycle' standard components.


Basically, we have some HTML Home Page Component (Narrow) that run in every salesforce pages - BUT for pages such as the console we're not able to generate the JS file / HTML code in the component as SF not loading it.


As far as I know in the Service Console Tab it's a bit different situation as we can develop specific custom home page component, but our questions refers to the regular console tab.


Thanks in advance,


  • April 09, 2013
  • Like
  • 0