{"id":3951,"date":"2014-08-18T23:09:00","date_gmt":"2014-08-18T23:09:00","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=3951"},"modified":"2014-08-19T00:07:37","modified_gmt":"2014-08-19T00:07:37","slug":"creating-salesforce-query-builder-in-node-js-and-angularjs-using-salesforce-rest-api-and-oauth2","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/creating-salesforce-query-builder-in-node-js-and-angularjs-using-salesforce-rest-api-and-oauth2\/","title":{"rendered":"Creating Salesforce Query Builder in Node.js and AngularJs using Salesforce REST API and OAuth2 with Heroku Button"},"content":{"rendered":"<p style=\"text-align: justify;\">In this post, we will be creating a\u00a0Salesforce Query (SOQL) Builder.\u00a0It uses Google&#8217;s Angularjs MVC Javascript library and REST API provided by Salesforce. For Authentication, it uses OAuth2.<\/p>\n<p style=\"text-align: justify;\">Node.js is used as a primary language and hosted on <a title=\"Salesforce Query Builder\" href=\"https:\/\/soqlbuilder.herokuapp.com\/\">Heroku<\/a>. If you want to directly deploy to your Heroku Account, You can use <strong><a title=\"Introducing Heroku Button\" href=\"https:\/\/blog.heroku.com\/archives\/2014\/8\/7\/heroku-button\">Heroku Button<\/a><\/strong> on this\u00a0<a title=\"SOQL Builder Code\" href=\"https:\/\/github.com\/JitendraZaa\/SOQLBuilder\">Git Repository<\/a>.<\/p>\n<p style=\"text-align: justify;\">We have many tools available online for Query builder, However none of them were satisfying me so though to create my own tool.<\/p>\n<p style=\"text-align: justify;\">This Node.js application is used for building SOQL with following features :<\/p>\n<ul style=\"text-align: justify;\">\n<li>Toggle between API name and Label Name<\/li>\n<li>Search Objects or Fileds needs to build SOQL (In my case, it was primitive. I had more than 70 Objects and many of those objects has 300+ fields)<\/li>\n<li>Checkboxes to select fields (No need to hold control button to select multiple fields)<\/li>\n<li>Automatic Query Builder at Right side of page<\/li>\n<li>Shows API count used by application<\/li>\n<li>Search returned records<\/li>\n<li>Sorting on Table Headers<\/li>\n<li>Pagination<\/li>\n<\/ul>\n<p>Note : <a title=\"Salesforce Connected App\" href=\"https:\/\/developer.salesforce.com\/page\/Connected_Apps\">You will need to create &#8220;Connected App&#8221; in Salesforce to allow OAuth as explained in this post.<\/a><\/p>\n<p style=\"text-align: justify;\"><a title=\"SOQL Builder - Salesforce using Node.js\" href=\"https:\/\/soqlbuilder.herokuapp.com\/\">Live Demo of application<\/a><\/p>\n<p style=\"text-align: justify;\"><!--more--><\/p>\n<p style=\"text-align: justify;\">Special thanks to\u00a0<a title=\"Building Force.com SOQL Query Tool with Node.Js - Part II\" href=\"http:\/\/www.oyecode.com\/2014\/04\/building-forcecom-soql-query-tool-with.html\">Harshit (OyeCode)\u00a0<\/a>and <a title=\"Salesforce SOQL API Explorer in 30 Lines of Code\" href=\"http:\/\/coenraets.org\/blog\/2014\/02\/building-a-force-com-api-explorer-in-30-lines-of-code\/\">Christophe Coenraets\u00a0<\/a>to provide base for creating this application.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/Y_-MGYDWNuc\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<figure id=\"attachment_3954\" aria-describedby=\"caption-attachment-3954\" style=\"width: 625px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-3954\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?resize=625%2C307&#038;ssl=1\" alt=\"SOQL Builder Using Node.js AngularJs Salesforce REST API on Heroku\" width=\"625\" height=\"307\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?resize=1024%2C504&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?resize=300%2C147&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?resize=624%2C307&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/08\/SOQL-Builder-Using-Node.js-AngularJs-Salesforce-REST-API-on-Heroku.png?w=1332&amp;ssl=1 1332w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-3954\" class=\"wp-caption-text\">SOQL Builder Using Node.js AngularJs Salesforce REST API on Heroku<\/figcaption><\/figure>\n<p><a title=\"Salesforce Query Builder using Node.Js, AngularJs, Salesforce REST API, OAuth2 and Heroku\" href=\"https:\/\/github.com\/JitendraZaa\/SOQLBuilder\">Complete Source Code of application and Deploy directly to your Heroku Account with help of Heroku Button.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we will be creating a\u00a0Salesforce Query (SOQL) Builder.\u00a0It uses Google&#8217;s Angularjs MVC Javascript library and REST API provided by Salesforce. For Authentication, it uses OAuth2. Node.js is used as a primary language and hosted on Heroku. If you want to directly deploy to your Heroku Account, You can use Heroku Button on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[26,266,9],"tags":[35,49,342,267,260,331],"class_list":["post-3951","post","type-post","status-publish","format-standard","hentry","category-web","category-node-js","category-salesforce","tag-angularjs","tag-bootstrap","tag-heroku","tag-nodejs","tag-oauth","tag-salesforce"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4047,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/how-to-use-postgresql-in-nodejs\/","url_meta":{"origin":3951,"position":0},"title":"How to use PostgreSQL in Nodejs","author":"Jitendra","date":"November 17, 2014","format":false,"excerpt":"I have written many articles on Node.js and AngularJs. In this article, I will demonstrate how to use PostgreSQL with Node.js and deploy on Heroku. I think you already smelled that this is one of starting article which will finally merged with Salesforce to create some cool application. Assuming you\u2026","rel":"","context":"In &quot;Node.js&quot;","block_context":{"text":"Node.js","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/others\/node-js\/"},"img":{"alt_text":"PostgreSQL in Node.js","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/11\/PostgreSQL-in-Node.js.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/11\/PostgreSQL-in-Node.js.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/11\/PostgreSQL-in-Node.js.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4038,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/dreamforce-2014-session-create-web-based-ide-for-salesforce\/","url_meta":{"origin":3951,"position":1},"title":"Dreamforce 2014 Session &#8211; create web based IDE for Salesforce","author":"Jitendra","date":"November 7, 2014","format":false,"excerpt":"In Dreamforce 2014, I got chance to present demo of creating online IDE for Salesforce using Tooling API. I used Node.js as a language to communicate with Salesforce API on Heroku Platform. Demo Simple Editor Complete source code (Github) Simple Editor Editor with Ace framework Dont forget to share your\u2026","rel":"","context":"In &quot;Heroku&quot;","block_context":{"text":"Heroku","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/heroku\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3937,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/heroku\/create-node-js-application-using-eclipse-and-deploy-to-heroku-video-tutorial\/","url_meta":{"origin":3951,"position":2},"title":"Create Node.js Application using Eclipse and deploy to Heroku &#8211; Video Tutorial","author":"Jitendra","date":"July 27, 2014","format":false,"excerpt":"In Below video, I have explained how to create basic Node.js application in Eclipse with help of Egit and Heroku plugin and deploy to Heroku. Please read below two articles, to get familiar of Plugins and how to setup : Salesforce + Git + Eclipse + EGIT = Better and\u2026","rel":"","context":"In &quot;Heroku&quot;","block_context":{"text":"Heroku","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/heroku\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4698,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/my-favorite-appexchange-products\/","url_meta":{"origin":3951,"position":3},"title":"Top Salesforce tools , AppExchange and Heroku applications","author":"Jitendra","date":"July 1, 2015","format":false,"excerpt":"List of all my favorite Appexchange products, Heroku applications , Git repository , Free Source codes and some important Blog posts in Salesforce","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Top Salesforce Tools","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Top-Salesforce-Tools.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3231,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/creating-first-application-in-heroku-using-eclipse\/","url_meta":{"origin":3951,"position":4},"title":"Creating First Application in Heroku using Eclipse","author":"Jitendra","date":"March 3, 2013","format":false,"excerpt":"Hello Readers, in this article we will see step by step procedure to deploy your first (Hello World) program in Heroku. There are two ways, first going through series of Commands of \"Heroku\" and \"GIT\" and other simple and smart way is to use Eclipse Capability with Heroku. To make\u2026","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"Setting up Credentials for Heroku in Eclipse","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/03\/Setting-up-Credentials-for-Heroku-in-Eclipse.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/03\/Setting-up-Credentials-for-Heroku-in-Eclipse.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/03\/Setting-up-Credentials-for-Heroku-in-Eclipse.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":7147,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-integration-with-nodejs-based-applications-using-canvas\/","url_meta":{"origin":3951,"position":5},"title":"Salesforce Integration with Nodejs based applications using Canvas","author":"Jitendra","date":"July 20, 2020","format":false,"excerpt":"How to use Canvas Signed Request Authentication with web based applications like Nodejs & how to use Canvas LifeCycle Handler Class","rel":"","context":"In &quot;Integration&quot;","block_context":{"text":"Integration","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/integration\/"},"img":{"alt_text":"Salesforce Canvas Integration","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2020\/07\/Salesforce-Canvas-Integration-e1624579092898.png?fit=700%2C567&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2020\/07\/Salesforce-Canvas-Integration-e1624579092898.png?fit=700%2C567&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2020\/07\/Salesforce-Canvas-Integration-e1624579092898.png?fit=700%2C567&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2020\/07\/Salesforce-Canvas-Integration-e1624579092898.png?fit=700%2C567&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=3951"}],"version-history":[{"count":11,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3951\/revisions"}],"predecessor-version":[{"id":3963,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/3951\/revisions\/3963"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=3951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=3951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=3951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}