Giter VIP home page Giter VIP logo

forceng's Issues

force.getUserID() not working

When using force.getUserID() on ionic it was not able to find oaurth.id and would crash the app.
I have fixed it in my copy by modifying the loginWithPlugin() function to pass the userId from creds returned getAuthCredentials into Init and adding it to the oaurth object.

I now have a userId item in oauth that can be used in the getUserId() function.

Simultaneous request

Is there a way to have two requests fired in parallel? Currently when I send two requests, the defer function for the second request is the one that is handling the response from the first request.

force.query(query_one).then(
    function (response_one) {
        handleResponse(response_one);
    });
force.query(query_two).then(
    function (response_two) {
        handleResponse(response_two);
    });

Logging into a community

I am trying to login to a community via the simulator or actual device. When I run force-server and login via the browser, everthing works fine but in the simulator context I get a page not found error:

screen shot 2015-03-30 at 10 50 41 am 2

I have changed the loginURL in forceng.js:

var loginURL = 'https://mycommunity.force.com/',

my proxyURL is localhost:8200... does this need to be something else for the simulator?

oauthPlugin = cordova.require("com.salesforce.plugin.oauth"); Issue

Hey, I have tried you app using force-server and it runs perfectly, great tutorial. However, I am trying to run your app on an Android device, but it opens up to a blank screen and the code stops at the oauthPlugin = cordova.require("com.salesforce.plugin.oauth"); line. Now I don't believe this is an issue on your part, as it seems more of a problem with my configuration of cordova. But have you come across this issue before or have any possible solutions?

Thanks!

forceng for Angular4 app

Does forceng.js support angular4 app as well or do we need to convert it into forceng.ts file?

blobs not supported

all functions related to blobs that can be found on forceTK... are not available on forceng:
blob = function (path, fields, filename, payloadField, payload, callback, error, retry)
createBlob = function (objtype, fields, filename,
payloadField, payload, callback,
error, retry)
updateBlob = function (objtype, id, fields, filename,
payloadField, payload, callback,
error, retry)

No Licese

Please add a license somewhere to your repository and/or your library source so that users can be sure they are using your library in accordance with the terms you want.

Requests Sharing deferred object

I've noticed that sometimes when I am performing some action when a promise comes back from some kind of request - it is possible that the request will hand back a promise that does not belong to the current request (the one I expect will be evaluated). For example:

return force.query('SELECT Id, FROM PricebookEntry').then(function(response) {
    pricebookentries = response.records;
});

return force.query('SELECT Id, FROM Account').then(function(response) {
    accounts = response.records;
});

If I perform these two queries in parallel - I have seen times where the response callback for the Account query will return the results from the PricebookEntry query. It's like the wires are getting crossed. I got around the problem by doing each successive call in a .then() block but that doesn't seem ideal.

Looking at the forceng source - I see this in the code:

 function request(obj) {

            if (!oauth || (!oauth.access_token && !oauth.refresh_token)) {
                deferred.reject('No access token. Login and try again.');
                return;
            }

            var method = obj.method || 'GET',
                headers = {},
                url = getRequestBaseURL();
            deferred = $q.defer();

Notice that the deferred is defined as a window variable (not var). So the deferred is actually shared across requests, which is interesting - and looks to be by design. Can you explain if this is the case and it is indeed supposed to operate like that? And if so, how to best perform multiple asynchronous requests without worrying about getting information for another request during promise resolve?

Thanks!

Small bug in request function

There is a small bug in request function - it's fixed on my fork.
('deffer' might throw undefined errors in some circumstances)

Not appering Login Screen

when I use browser with proxy it`s working fine and able to login to app with browser plugin.but when I am build my app and try to open in Android it shows empty screen instead of login screen with out any exception.
did i miss any thing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.