• dxjones
  • NEWBIE
  • 60 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 24
    Replies

We are connecting Salesforce to an external web application using Apex pages.

 

Where can we look to find the "Limits" that exist on the number of page views per day that are allowed?

 

thanks in advance,

  David Jones

 

We are coding a web application integrated with Salesforce.com and we have run into several challenges.

 

One of the obstacles is that, by default, Salesforce.com sets HTTP response headers to allow caching.

 

In our applicaiton, it is a requirement that the HTTP responses must not be cached.

Every request must come to our Salesforce.com application to get a "fresh" result, and to update fields in our database.

It is a disaster if an old (cached) response is used by the remote site.

 

How can we alter the HTTP response headers to force Saleforce.com to disable caching?

 

A typical Salesforce.com HTTP response includes this header line (which is a problem for us):

 

Cache-Control: public, max-age=600

 

A working setup on a server outside Salesforce.com includes these header lines:

 

Content-Length: 308

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

 

How can we force Salesforce.com to output these header lines??

 

-- David Jones

We are coding a web application (integrated with Salesforce.com) and we have run into several challenges.

 

One obstacle is that Salesforce.com sends HTTP 1.0 responses using "Transfer-Encoding: chunked".

The other service (with which we are integrating) cannot handle this response format.

 

Is there any way we can *force* the entire HTTP response to be sent in one piece (instead of chunks)?

 

-- David Jones

We are coding a web application integrated with Salesforce.com and we have run into several challenges.

 

The first one is that Salesforce.com replies to HTTP requests with the old-fashioned HTTP 1.0 (instead of the more up-to-date HTTP 1.1)

 

Is there any way we can *force* an HTTP 1.1 response?

 

Will HTTP responses be updated to 1.1 with Spring 11?

 

-- David Jones

 

When glancing at the old-school SOAP API documentation,
I see some some calls that don't immediately seem reflected in the REST API.


I am wondering if/when this functionality will eventually be added to the REST API?

Examples include:
      convertLead, getDeleted, getUpdated, merge, sendEmail, upsert

 

thanks in advance,

  David Jones, PhD

http://dxjones.com

 

 

I can easily see how I can create, read, update, delete records on Salesforce with the REST API.

I would like to create an "Activity" on a "Lead" (for instance, to log details of a recent telephone call).

I don't immediately see how I can do this through the REST API,
... partly because I don't see a separate "Activity" object that I could first "create",
and then add to a Lead object using an "update".

Can you point me in the right direction to see how I can solve this?
I'm stuck.

 

thanks in advance,

  David Jones, PhD

http://dxjones.com

 

I've given the REST API a test-drive in my Developer Edition account.  My code is working just fine.

 

I am ready to put it into production for my client who has a regular Salesforce.com account.

 

At present, the REST API seems to be restricted to Developer Edition only.  Is this correct?

 

If not, how do I enable the REST API in production?

 

If it is restricted, when will this restriction be lifted? ... or else who do I need to persuade to give me early permission to use the REST API with real live data, instead of just running small examples to kick the tires?

 

thanks,

  David Jones, PhD

 

http://dxjones.com

 

I am trying to use the SoqlXplorer version 1.10 ... ("SOQL Explorer")

 

http://www.pocketsoap.com/osx/soqlx/

 

Here is the error message I get:

 

LOGIN_MUST_USE_SECURITY_TOKEN:

Invalid username, password, security token; ...

 

The problem is, ... where the heck to I enter the security token?

The only options I have in the dialog box are Username and Password.

There is no way to enter a Security Token.

 

Anyone else having this problem?

 

-- David

dxjones@gmail.com

 

 

Hi,

 

I am following Pat Patterson's recent PHP code examples.

 

I can get them to work in my Developer Edition, but when I move into the Sandbox of my Enterprise Edition, I seem to be able to get my access_token, but when I try to do the simplest operation (show_accounts) I get an HTTP Status 403 Forbidden returned.

 

Is this because the REST API is only enabled for the Developer Edition?

 

If this should work, I would appreciate suggestions for how to diagnose the source of the 403.

 

thanks,

  David Jones

 

I have been trying out the new SF REST API, and "Getting Started" examples work fine, at least, ... they seemed to work, as long as I happened to be already logged in Salesforce.

 

I have been following this PHP code example (which does the same thing as the original Java example):

 

http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php

 

The problem arises when trying to do REST API calls from a web application.

 

(example:  web app periodically synchronizes MySQL database on PHP server with Salesforce Records.)

 

This fails because the REST API seems to require the user to be logged in.

If the user is not logged in, the OAuth2 redirects to an interactive login page.

 

This, of course, fails when there is no live person around at the time the web app is trying to do the REST API calls.

 

Is there any way to perform REST API calls without requiring an Interactive Login??

 

For instance, ... can the authentication tokens returned using OAuth2 be stored and re-used indefinitely??

 

Example code would be much appreciated.

 

-- David Jones

 

 

The "Getting Started" code examples show how to INSERT and UPDATE individual records using the new REST API.

 

In my own testing, this seems to take about 100 msec per REST API call.

 

If I need to INSERT or UPDATE 1,000 records, and I do then one-by-one, that's going to take a long time.

 

Can anyone point to some documentation or example code, that shows how to many records with a single REST API call?

 

thanks in advance,

  David Jones, PhD

 

dxjones@gmail.com

http://dxjones.com

 

I am hoping this is an easy question:

I am invoking an "action" when a visualforce web page is loaded.


    <apex:page contentType="text/xml" controller="MyPageController" action="{!MyUpsertAction}" showHeader="false">


From extensive tracing and debugging, I know MyPageController is working and MyUpsertAction is working
up until the moment it tries to do an "upsert".

I can't figure out how to allow DML operations initiated through a web/visualforce page.

I get the dreaded "Authorization Required" page displayed (instead of the XML my page should be serving up).

I also get an error message sent by email.

    Apex script unhandled exception by user/organization: 005A0000000IePu/00DA0000000Jcjx

    Visualforce Page: /

    caused by: System.Exception: DML currently not allowed


I am sure there is a quick fix by clicking some option somewhere on Saleseforce,
but I am really pulling my hair out trying to find it!


Please be specific about the steps I need to follow to solve this problem.

I am new to developing on Salesforce, so if you just say "enable DML for the site",

I won't have a clue where to navigate and click on the Salesforce web pages.

 

Any suggestions would be appreciated.

David Jones

dxjones@gmail.com

 

I am hoping this is an easy question:

I am invoking an "action" when a visualforce web page is loaded.


    <apex:page contentType="text/xml" controller="MyPageController" action="{!MyUpsertAction}" showHeader="false">


From extensive tracing and debugging, I know MyPageController is working and MyUpsertAction is working
up until the moment it tries to do an "upsert".

I can't figure out how to allow DML operations initiated through a web/visualforce page.

I get the dreaded "Authorization Required" page displayed (instead of the XML my page should be serving up).

I also get an error message sent by email.

    Apex script unhandled exception by user/organization: 005A0000000IePu/00DA0000000Jcjx

    Visualforce Page: /

    caused by: System.Exception: DML currently not allowed


I am sure there is a quick fix by clicking some option somewhere on Saleseforce,
but I am really pulling my hair out trying to find it!


Please be specific about the steps I need to follow to solve this problem.

I am new to developing on Salesforce, so if you just say "enable DML for the site",

I won't have a clue where to navigate and click on the Salesforce web pages.

 

Any suggestions would be appreciated.

David Jones

dxjones@gmail.com

 

We are coding a web application integrated with Salesforce.com and we have run into several challenges.

 

One of the obstacles is that, by default, Salesforce.com sets HTTP response headers to allow caching.

 

In our applicaiton, it is a requirement that the HTTP responses must not be cached.

Every request must come to our Salesforce.com application to get a "fresh" result, and to update fields in our database.

It is a disaster if an old (cached) response is used by the remote site.

 

How can we alter the HTTP response headers to force Saleforce.com to disable caching?

 

A typical Salesforce.com HTTP response includes this header line (which is a problem for us):

 

Cache-Control: public, max-age=600

 

A working setup on a server outside Salesforce.com includes these header lines:

 

Content-Length: 308

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

 

How can we force Salesforce.com to output these header lines??

 

-- David Jones

We are coding a web application integrated with Salesforce.com and we have run into several challenges.

 

The first one is that Salesforce.com replies to HTTP requests with the old-fashioned HTTP 1.0 (instead of the more up-to-date HTTP 1.1)

 

Is there any way we can *force* an HTTP 1.1 response?

 

Will HTTP responses be updated to 1.1 with Spring 11?

 

-- David Jones

 

When glancing at the old-school SOAP API documentation,
I see some some calls that don't immediately seem reflected in the REST API.


I am wondering if/when this functionality will eventually be added to the REST API?

Examples include:
      convertLead, getDeleted, getUpdated, merge, sendEmail, upsert

 

thanks in advance,

  David Jones, PhD

http://dxjones.com

 

Hi.

 

I have implemented a client that uses oauth2, storing the access token and the refresh token. It works fine and also refresh operation works, but if the access token expires I expect a specific error message so I can handle the problem refreshing the token.

 

As of Oauth2 reference documentation

http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-4

when a request is done with an expired token, the header of the answer should report a "expired_token" error.

 

Actually the Salesforce implementation returns a generic 401 error is returned without additional header information so is not possible to check for the specific error and try to refresh the token with the stored refresh token.

 

The Spring Oauth2 default implementation expect this as of  spring-security-oauth, in

DefaultOAuth2SerializationService.deserializeError()

this is also as discussed here:

http://forum.springsource.org/showthread.php?p=333915#post333915

 

Another related problem is that the expires_on parameter is not returned when the access token is provided at first instance, as discusse on this board here:

http://boards.developerforce.com/t5/REST-API-Integration/OAuth-2-0-User-Agent-flow-doesn-t-return-expires-on/m-p/223323

 

Thanks.

When is the REST API going to be released? I understand right now its a pilot release on the developer edition. I am working on an app for the Enterprise edition and i want to use REST.

Thanks

  • December 02, 2010
  • Like
  • 0

I have been trying out the new SF REST API, and "Getting Started" examples work fine, at least, ... they seemed to work, as long as I happened to be already logged in Salesforce.

 

I have been following this PHP code example (which does the same thing as the original Java example):

 

http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php

 

The problem arises when trying to do REST API calls from a web application.

 

(example:  web app periodically synchronizes MySQL database on PHP server with Salesforce Records.)

 

This fails because the REST API seems to require the user to be logged in.

If the user is not logged in, the OAuth2 redirects to an interactive login page.

 

This, of course, fails when there is no live person around at the time the web app is trying to do the REST API calls.

 

Is there any way to perform REST API calls without requiring an Interactive Login??

 

For instance, ... can the authentication tokens returned using OAuth2 be stored and re-used indefinitely??

 

Example code would be much appreciated.

 

-- David Jones

 

 

The "Getting Started" code examples show how to INSERT and UPDATE individual records using the new REST API.

 

In my own testing, this seems to take about 100 msec per REST API call.

 

If I need to INSERT or UPDATE 1,000 records, and I do then one-by-one, that's going to take a long time.

 

Can anyone point to some documentation or example code, that shows how to many records with a single REST API call?

 

thanks in advance,

  David Jones, PhD

 

dxjones@gmail.com

http://dxjones.com