Giter Club home page Giter Club logo

salesforcecanvasframeworksdk's Introduction

Salesforce Force.com Canvas SDK

Introduction

Force.com Canvas is a mechanism for consuming third-party applications within Salesforce. Its goal is to connect applications at a UI level instead of just an API level. The purpose of this GitHub repository is to provide third-party applications with a Java/JavaScript SDK and examples so you can easily integrate canvas-style applications into Salesforce, while developing in the technology and platform of your choice.

The best place to get started building canvas applications is the online developer guide.

Currently, we provide Java examples in this repository, but you can develop in whatever language you prefer. Most of the integration with Salesforce is through JavaScript and REST. You can also run and test your application locally from your own host, or from Heroku.

Examples

This SDK contains some basic Java examples. We recommend you explore the Heroku Quick Start, for additional examples in Java and Ruby.

For other examples and resources, check out the developer guide.

Prerequisites

Below are some useful commands and links for your convenience. Before you use them, you'll need to make sure you have the necessary software installed on your computer here.

How to clone the SDK repository

git clone [email protected]:forcedotcom/SalesforceCanvasFrameworkSDK.git
cd SalesforceCanvasFrameworkSDK
git submodule init
git submodule update

How to build canvas locally

If you prefer, you can build and test your application locally before you push to Heroku or any other server. If you decide to test locally, you'll also need to generate a local keystore so you can do SSL.

mvn package

First time keystore generation

This is only needed to support SSL (https) when running locally. Heroku uses piggyback SSL so it's not needed there.

  > keytool -keystore keystore -alias jetty -genkey -keyalg RSA
  Enter keystore password: 123456
  Re-enter new password: 123456
  What is your first and last name?
    [Unknown]:  John Doe
  What is the name of your organizational unit?
    [Unknown]:  myorgunit
  What is the name of your organization?
    [Unknown]:  myorg
  What is the name of your City or Locality?
    [Unknown]:  San Fancisco
  What is the name of your State or Province?
    [Unknown]:  CA
  What is the two-letter country code for this unit?
    [Unknown]:  us
  Is CN=salesforce.com, OU=platform, O=chimera, L=San Fancisco, ST=CA, C=us correct?
    [no]:  yes

  Enter key password for <jetty>
(RETURN if same as keystore password):  
  Re-enter new password: 

How to run canvas locally

If you're running and testing locally, this will start your Java Web server.

sh target/bin/webapp

Canvas URL

If you're running locally 
https://localhost:8443/examples/hello-world/index.jsp

Or if you're running on Heroku
https://<your-heroku-app>.herokuapp.com/examples/hello-world/index.jsp

Canvas callback URLs

If you're running locally
https://localhost:8443/sdk/callback.html

Or if you're running on Heroku
https://<your-heroku-app>.herokuapp.com/sdk/callback.html

How to push new changes to Heroku

To commit your changes into your local git repository and push those changes to Heroku, use these commands. Note that your repository name may be diffferent than 'heroku', use git remote -v to confirm.

  git add -A
  git commit -m "My change comments"
  git push heroku master

How to get Heroku logs

To access your logs on Heroku, use the following command. For more information on Heroku logs click here.

  heroku logs --tail

salesforcecanvasframeworksdk's People

Contributors

bryant1410 avatar cdengsfdc avatar douglasdew avatar dsiebold avatar jolley-sfdc avatar jthurst01 avatar karihotchkiss avatar mblumreich avatar svc-scm avatar tq-jappy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salesforcecanvasframeworksdk's Issues

outdated jetty version leads to SSL_ERROR_NO_CYPHER_OVERLAP

In the pom there is a version of jetty which is already EOL (https://wiki.eclipse.org/Jetty/Howto/CipherSuites)
If I replace the webapp with a new version (e.g. 9.4.35.v20201120) I get the following error when starting jetty.
image

I'm trying to use the example of the Canvas app on https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/quick_start_run_the_app_locally.htm. At the point "Run the web App locally" I get the error message "SSL_ERROR_NO_CYPHER_OVERLAP".

Error: org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

I'm getting errors:

Problem accessing /examples/hello-world/index.jsp. Reason:

    PWC6033: Unable to compile class for JSP

PWC6199: Generated servlet error:
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

PWC6199: Generated servlet error:
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

Not sure what to do. Java 8 on Mac with MVN 3.5.2

Unable to call the autogrow function

hey

I've added the Javascript Canvas SDK(to be precise the canvas-all.js library) to my NodeJS project and there are some functions that seem to be missing like 'autogrow' that are referenced in the lates canvas dev docs.

For example:

 // Turn on auto grow with default settings.
Sfdc.canvas(function() {
    sr = JSON.parse('<%=signedRequestJson%>');
    Sfdc.canvas.client.autogrow(sr.client);
});

Throws the following error:

Uncaught TypeError: Object #<Object> has no method 'autogrow' 

Hope am not missing anything trivial.

Misleading pom version attribute

The version attribute of the POM still reads 1.0-SNAPSHOT although the official version is 41.0. May I suggest to synchronize the values?

Receiving error "Unable to retrieve signed request from the server. Please try your request later"

Hi there, I tried both the Canvas App Heroku Quick Start and also the Advanced, following the exactly steps as describe on the Canvas Development Guide for version 40 '17, but in the Canvas Previewer I'm receiving the error message: "Unable to retrieve signed request from the server. Please try your request later".

I have configured the API (Enable OAuth Settings) and also the Canvas App Settings Access Method with Signed Request (POST), also have the "Admin approved users are pre-authorized" configured with the Administrator assigned to the Canvas App.

I spent several hours trying to figure out what else can be missing, any help is really appreciated,

Thanks,

Compiler Version Fix

[ERROR] error: Source option 6 is no longer supported. Use 7 or later.
The build was failing on running "mvn package"

I had to fix it by changing pom.xml to following

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
        <source>1.7</source>
        <target>1.7</target>
        <!-- 
            Not working 
        <source>${java.version}</source>
        <target>${java.version}</target>
         -->
    </configuration>
</plugin>

Please review if this is a good general fix for pom.xml, or any other change is needed else where.

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.