Login with your salesforce Credentials
- Select Setup from the homePage (Incase if you couldn’t find it click on the name and the you will find the setup option).
- In the right side in the quick search box enter Object and click the objects.
- list of existing object appears and then click on the new object and a window appears as below.
- Enter the appropriate label name and the plural name. A Standard field can be created either data Type – Name or auto-number.
- At the bottom select the “Launch new custom wizard Tab after saving the custom object”.
- click on next and choose a tab style for the object and save the object.
- After saving the object a detail page appears for the object created.
To create fields for that object
- Select NEW from the Custom fields & relationship.
Choose the required Data type and create the field by clicking next and save button.
Creating Salesforce Connected App
To create a connected app in salesforce
- Setup→Create→ App→ connected App→ new.
- Give a name to the app and the contact mail ID.
- Select “Enable OAuth settings” checkBox and give a setBack URL.
- In Selected OAuth scopes choose “full Access”.
Create a account in GitHub (https://github.com/) and create a repository and select as a public repository
- Download the GitHub desktop app https://desktop.github.com/ and install the app and open when it’s done.
- Click on the clone repository and add the URL of the repository you created (paste the HTTP link of the repository).
- Clone of the repository is created locally (Documents/GitHub/repository_name).
- Move the folders to the repository which are to be added to GitHub and Once you paste the code you can see the files in the GitHub Application.
- Provide a valid message for the files to be uploaded.
Click commit to master and at the top you need to press the push button to commit to GitHub.
This is my github URL:
Create a account in Heroku and create a app and open it.
Click on the resources tab and in the Add-ons input add both.
- Heroku postgres
- Heroku connect
Click on the heroku postgres , you will see the table size ,number of rows in overView tab.
And select heroku postgres → settings , you can see the Database credentials .
Config Variables for adding salesforce org details
From App → Settings → Config variables→ Reveal config variables
Add the salesforce credentials like
- Consumer key
- Secret key
- Call back URL
- Database URI
- Org Id
Add NodeJs as a buildPack
How to connect GitHub and Heroku
- App→ Deploy → deployment method
- Once you logged in to your github account.
- Select the GitHub and give access then the select the search button and the list of repository appears and select which was created earlier.
- To automatically deploy the changes in the GitHub to heroku database select “enable automatic deploys”
- In Case if automatic deploy is not enabled to validate the code, then mannual deploy should be selected every time the code is changed or committed to GitHub. (For this we need CI automation.)
- Local repository → GitHub (push) → heroku(automatic or manual deploy).
Open the NodeJs folder
- Open in sublime text→ server→ config → database.js
- Enter the postgres database credentials in the Database.js file.
- Open in sublime text→ server→ config → routes.js
- For build your URL , accessing your postgres database and salesforce org.
Creating a table in your postgres database
- In command prompt type → npm install psql
- In PC→ properties → Advanced system settings→ environment variables→ path → edit → add→ C:\Program Files\PostgreSQL\<version-number>\bin (in both user variables and system variables).
- Login with heroku → heroku login
- Enter login credentials (logged in as username message appears )
- Paste the Postgres Database URL