Skip to content

s-docs/plugin-sf-sdocs

Repository files navigation

sdocs

Installation

  1. Clone this plugin repository
git clone https://github.com/s-docs/plugin-sf-sdocs
  1. Build the plugin using the below command
npm install
  1. In the directory where you cloned the repo execute the following:
sf plugins link .

If the above step is successful, then the plugin was linked in your local environment successfully.

Testing the plugin

To ensure the plugin in linked correctly, run the following command:

sf sdocs template export --help

This should print something like below:

Export S-Docs template from an salesforce org

USAGE
  $ sf sdocs template export -o <value> -d <value> [--json] [-n <value>] [-a]

FLAGS
  -a, --exportall          A flag that tells the plugin if you want to export all active templates. Default is `false`
  -d, --outputdir=<value>  (required) The directory where the templates will be exported
  -f, --filters=<value>    Specify any fitlers when extracting templates. This is the `WHERE` clause for the extraction
  -n, --name=<value>       The name of the template to be exported. Should be the value of the `Name` field on the `SDOC___SDTemplate__c` object
  -o, --org=<value>        (required) The org alias that you want to export the template from

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Export S-Docs template from an salesforce org

  Export S-Docs template from an salesforce org


Commands available in SDocs CLI

export

This exports a given template or all templates to the file system that can be then imported into another org or environment. See the examples show when you do sf sdocs template export --help for more specifics

Examples

Export a template named NDA 2023 from a sandbox to the templates output directory

    $ sf sdocs template export -o my_dev_sandbox -d ./templates -n "NDA 2023"

Export all templates from my_dev_sandbox

    $ sf sdocs template export -o my_dev_sandbox -d ./templates --exportall

import

This exports a given template from the file system into another org or environment. See the examples show when you do sf sdocs template import --help for more specifics

Examples

Import a template named NDA 2023 to a sandbox from the templates output directory

    $ sf sdocs template import -o my_dev_sandbox -d ./templates -n "NDA 2023"

Import all templates from my_dev_sandbox

    $ sf sdocs template import -o my_dev_sandbox -d ./templates --importall

About

A SDocs plugin for the `sf` CLI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published