• kavayah
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I am folloiwng the tutorial mentioned in the below URL.

https://developer.salesforce.com/mobile/getting-started/html5/#angularjs-heroku

I followed exactly as mentioned, I am able to OAuth successfully, I am able to create a contact and that gets saved, but during contact list view, I am getting the following error.

Error:
------------------------------------------------------------
Calling errorCB for forcetkClient:query

Refused to set unsafe header "User-Agent"
GET https://peaceful-gorge-3898.herokuapp.com/proxy/?_=1406084316812 400 (Bad Request)

function (){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this}

------------------------------------------------------------------------

I am getting this error at this point.

function ContactListCtrl($scope, AngularForce, $location, Contact) {
    if (!AngularForce.authenticated()) {
        return $location.path('/home');
    }

    $scope.searchTerm = '';
    $scope.working = false;

    Contact.query(function (data) {
        $scope.contacts = data.records;
        $scope.$apply();//Required coz sfdc uses jquery.ajax
    }, function (data) {
        console.log(' ~~~~~~~~~~~~~ Error : ' + data.error);
        alert('Query Error : ' + data.error);
        $scope.contacts = data.records;

    });

Did anybody encounter any such error?

Hi:

 

I have utilized angular JS in visualforce page aling with apex class to make a enhance dynamic search of transaction data in salesforce. The way it is done now is the following.

 

1) Apex Class executes a SOQL which returns a JSON string of data elements.

2) Visual force page which incorporates angular JS shows the data, with a search box on top.

 

Problem:

==========

Some of the objects is returning more than 50000 rows, and governor limit exception is thrown. 

 

Question:

==========

How can I invoke to get chunks of 100 records, the user will search from that 100 records, if the search data do not exist, then "Show More" button will retrieve the next 100 records.

 

Any help is really appreciated.

 

I am folloiwng the tutorial mentioned in the below URL.

https://developer.salesforce.com/mobile/getting-started/html5/#angularjs-heroku

I followed exactly as mentioned, I am able to OAuth successfully, I am able to create a contact and that gets saved, but during contact list view, I am getting the following error.

Error:
------------------------------------------------------------
Calling errorCB for forcetkClient:query

Refused to set unsafe header "User-Agent"
GET https://peaceful-gorge-3898.herokuapp.com/proxy/?_=1406084316812 400 (Bad Request)

function (){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this}

------------------------------------------------------------------------

I am getting this error at this point.

function ContactListCtrl($scope, AngularForce, $location, Contact) {
    if (!AngularForce.authenticated()) {
        return $location.path('/home');
    }

    $scope.searchTerm = '';
    $scope.working = false;

    Contact.query(function (data) {
        $scope.contacts = data.records;
        $scope.$apply();//Required coz sfdc uses jquery.ajax
    }, function (data) {
        console.log(' ~~~~~~~~~~~~~ Error : ' + data.error);
        alert('Query Error : ' + data.error);
        $scope.contacts = data.records;

    });

Did anybody encounter any such error?