Code Monkey home page Code Monkey logo

salesforce-tooling-api's Introduction

SalesForce-Tooling-API

Helper method to create apex,visualforce,lighting component,lighting web component using tooling api

Tooling Api End Points 1.Querying files = /services/data/v43.0/tooling/query?q=

a.Fetching apex select+id+from+apexclass

b.Fetching vf select+id+from+apexpage

c.Fetching lighting component select+id+from+AuraDefinition

d.Fetching lighting web component select+id+from+LightningComponentResource

1.Inserting Apex class =/services/data/v45.0/tooling/sobjects/ApexClass

a.Post Method

b.JSON Request Body

  {
      "Name":"myclass",
      "Body":"public class myclass{}"
   }

2.Inserting Vf Page = /services/data/v45.0/sobjects/ApexPage

a.Post Method

b.JSON Request Body

    
      {
        "Name":"my_page",
        "Markup":"<apex:page ></apex:page>",
        "MasterLabel":"my_page"
      }

3.1 Inserting lighitng component Bundle = /services/data/v45.0/sobjects/AuraDefinitionBundle

a.Post Method

b.JSON Request Body

         { "DeveloperName":"my_cmp",
         "MasterLabel":"my_cmp", 
         "Description":"cmp",
         "ApiVersion":"45" }

c.response is auradefenationbundel id used in creating AuraDefinition

3.1 Inserting lighitng component Controller Resourse = /services/data/v45.0/sobjects/AuraDefinition

a.Post Method

b.JSON Request Body

        {
        "AuraDefinitionBundleId":"0Ab6F000000XXXXXX",
        "DefType":"CONTROLLER",
         "Format":"JS",
        "Source":"({myMethod  : function(component, event, helper) {}})"
      }

3.2 Inserting lighitng component Css Resourse = /services/data/v45.0/sobjects/AuraDefinition a.Post Method b.JSON Request Body

        {
        "AuraDefinitionBundleId":"0Ab6F000000XXXXXX",
        "DefType":"STYLE",
         "Format":"CSS",
        "Source":".THIS{}"
      }

4.1 Inserting lighitng web component Bundle = /services/data/v45.0/sobjects/LightningComponentBundle

a.Post method

b.JSON Request Body

        {
        "FullName":"cmpName",
        "Metadata":{
        "masterLabel":"cmpName"
        }
      }

c.response is LightningComponentBundle id used in creating LightningComponentResource

4.2 Inserting lighitng web component js file = /services/data/v45.0/sobjects/LightningComponentResource

a.Post method

b.JSON Request Body

        {
        "LightningComponentBundleId":"bundleId",
        "FilePath":"lwc/cmpName/cmpName.js",
        "Format":"js",
        "Source":"import { LightningElement } from 'lwc';export default class mycmp extends LightningElement {}"
      }

salesforce-tooling-api's People

Contributors

sonicfurqan avatar

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.