SalesforceXyTools For Sublime Support Git Command
SalesforceXytoolsForSublime is Rapid development tools for Salesforce Development.
From v2.1.7 Support git command , Github Wiki
SalesforceXyTools Support Git Command
Lable | Command | Description |
---|---|---|
git:version | git --version | |
git:gui | git gui | |
git:init | git init | |
git:add | git add ${input:git_add_file} | |
git:add:all | git add --all | |
git:clone | git clone ${input:git_url} | |
git:log:pretty | git log ${git_log_format} --date-order | |
git:log:pretty:graph | git log ${git_log_format} --date-order --graph | |
git:log:pretty:n | git log -${input:git_log_number} ${git_log_format} | |
git:log:pretty:graph:n | git log -${input:git_log_number} ${git_log_format} --graph | |
git:fetch:all | git fetch --all | |
git:pull:all | git pull --all | |
git:branch:list | git branch ${select:git_branch} | |
git:branch:list_local | git branch | |
git:checkout:branch_name | git checkout ${input:git_branch_name} | |
git:checkout:new_branch_name | git checkout -b ${input:git_branch_name} | |
git:branch:delete | git branch --delete ${input:git_branch_name} | |
git:checkout:master | git checkout master | |
git:tag | git tag | |
git:status | git status -s | |
git:log | git log | |
git:log:stat | git log --stat | |
git:log:search | git log ${git_log_format} --grep "${input:keyword}" | |
git:log:tag | git log ${input:tag} HEAD --pretty=format:%s | |
git:log:feature | git log ${input:tag} HEAD --grep feature | |
git:log:follow | git log --follow [file] | |
git:log:diff | git log -p ${input:file} | |
git:log:5 | git log -5 --pretty --oneline | |
git:shortlog | git shortlog -sn | |
git:blame | git blame ${input:file} | |
git:diff | git diff | |
git:diff:cached | git diff --cached ${input:file} | |
git:diff:head | git diff HEAD | |
git:diff:branch:name-only | git diff ${input:branch1}...${input:branch2} --name-only | |
git:diff:branch | git diff ${input:branch1}...${input:branch2} | |
git:diff:today | git diff --shortstat "@{0 day ago}" | |
git:diff:file | git diff -- "${file}" | |
git:show | git show | |
git:show:commit | git show ${input:commit_id} | |
git:show:commit:name-only | git show --name-only ${input:commit_id} | |
git:show:commit:filename | git show ${input:commit}:${input:file} | |
git:commit:diff | git diff ${input:commit1} ${input:commit2} --stat | |
git:reflog | git reflog | |
git:commit | git commit -m "${input:git_commit_message}" | |
git:remote:add:origin | git remote add origin ${input:git_remote_url} | |
git:remote:verbose | git remote -v | |
git:push:origin_to_master | git push -u origin ${input:git_master} | |
git:stash:save | git stash save "${input:git_statsh_message}" | |
git:stash:show | git stash show ${input:git_statsh_name} | |
git:stash:show:p | git stash show ${input:git_statsh_name} -p | |
git:stash:list | git stash list | |
git:stash:apply | git stash apply ${input:git_statsh_name} | |
git:stash:drop | git stash drop ${input:git_statsh_name} | |
git:reset | git reset HEAD . | |
git:reset:file | git reset ${input:git_reset_file_or_dir} | |
git:config:open | "${execPath}" .git/config | |
git:config:set | git config ${select:git_config_key} ${input:git_config_val} | |
git:config:set:core.quotepath:false | git config core.quotepath false | |
git:config:set:core.autocrlf:false | git config core.autocrlf false | |
git:config:set:push.default:simple | git config push.default simple | |
git:config:set:credential.helper:wincred | git config credential.helper wincred |
Useage
SalesforceXyTools Support SFDX develop
SalesforceXytoolsForSublime is Rapid development tools for Salesforce Development.
From SalesforceXytools For Sublime
v2.1.6(2019/06/15) Support Sfdx Deveopment.
Let us talk about using SalesforceXytools For Sublime
for Salesforce SFDX Development.
start sfdx development
SFDX Command Palette
use ctrl+alt+o
or SFDX
->SFDX Command
to open SFDX Command Palette
Create Project
force:project:create
Input your workspaceFolder
[2019-06-15 15:56:30][info] sfdx force:project:create -n "D:\Sfdx-Hello" --template standard [2019-06-15 15:56:30][info] ******************************************************************************** target dir = D:\Sfdx-Hello create sfdx-project.json create README.md create .forceignore create .gitignore create config\project-scratch-def.json create .vscode\settings.json create .vscode\launch.json create .vscode\extensions.json create .prettierrc create .prettierignore create force-app\main\default\lwc\.eslintrc.json
Authorize an Org
force:auth:web:login
Select test or product.
Input your Alias.
[2019-06-15 15:58:00][info] sfdx force:auth:web:login --instanceurl https://login.salesforce.com --setalias Dev1
Test Login
[2019-06-15 15:59:36][info] sfdx force:org:open -p /home/home.jsp -u Dev1 [2019-06-15 15:59:36][info] ******************************************************************************** Access org 00DXXXXXXXX as user exiaxxxxxxxxxxxxxxxxxxx@xxxxxxxxxxx.com with the following URL: https://xxxxxxxxxxx.my.salesforce.com/secur/frontdoor.jsp?sid=xxxxxxxxxx
Set default username
force:config:set:defaultusername
[2019-06-15 15:59:58][info] sfdx force:config:set defaultusername=Dev1 [2019-06-15 15:59:58][info] ******************************************************************************** === Set Config NAME VALUE ─────────────── ───── defaultusername Dev1
Set default username
Retrieve Source from Org
force:source:retrieve:metadata:base "ApexClass, ApexPage, ApexComponent, ApexTrigger, LightningComponentBundle, AuraDefinitionBundle, CustomObject"
Create Apex, Trigger, Aura, LWC
create apex
[2019-06-15 16:05:59][info] sfdx force:apex:class:create -n Hello1 --outputdir "./force-app/main/default/classes" --template DefaultApexClass [2019-06-15 16:05:59][info] ******************************************************************************** target dir = D:\Sfdx-Hello\force-app\main\default\classes create Hello1.cls create Hello1.cls-meta.xml
change your code.
public with sharing class Hello1 { public Hello1() { System.debug('hello world'); } }
Deploy Source from Org
[2019-06-15 16:07:48][info] sfdx force:source:deploy --loglevel fatal --sourcepath "D:\Sfdx-Hello\force-app\main\default\classes\Hello1.cls" --targetusername=Dev1 [2019-06-15 16:07:48][info] ******************************************************************************** === Deployed Source FULL NAME TYPE PROJECT PATH ───────── ───────── ────────────────────────────────────────────────── Hello1 ApexClass force-app\main\default\classes\Hello1.cls Hello1 ApexClass force-app\main\default\classes\Hello1.cls-meta.xml
Document
Know more sfdx command. The office document about
Salesforce CLI Command Reference
sfdx base command
List
sfdx force:alias:list sfdx force:org:list
SFDX: Create Project with Manifest
sfdx force:project:create -n ProjectName
SFDX: Authorize an Org
sfdx force:auth:web:login --setalias MyDevOrg --setdefaultusername
SFDX: Retrieve Source from Org
sfdx force:source:retrieve --manifest ./manifest/package.xml sfdx force:source:retrieve --metadata "ApexClass, ApexPage, ApexComponent, ApexTrigger, LightningComponentBundle, AuraDefinitionBundle, CustomObject"
SFDC: Deploy Source to Org
sfdx force:source:deploy --json --loglevel fatal --sourcepath ./force-app/main/default/classes/APEX_NAME.cls sfdx force:source:deploy -p ./force-app/main/src
Something For sfdc developer
Something For sfdc developer.
SalesforceXyToolsForSublime Reference
- Reference
- SalesforceXyToolsForSublime Guide
- SalesforceXyToolsForSublime-Rapid-development-tools-for-Salesforce
- SalesforceXyToolsForSublime-Rapid-development-tools-for-Salesforce.pdf
- Source of SalesforceForSublime
- Issues of SalesforceXyToolsForSublime
SalesforceXyToolsCore
提供功能基本的例子:
- Python上でApexClassを作成・更新・削除
- Python上でSobjectを作成・更新・削除
- Python上でApexログを取得
- Python上でApexScriptを実行する
- Python上でSalesforce組織のSoqlを実行する
- Python上でテストクラスを実行する
- Python上でSalesforceのREST APIへアクセス
- Python上でSalesforce組織を説明するメタデータを取得する
- Python上でSalesforce組織からのPackage.xmlを作成
- Python上ですべてのMetadataを情報を取得してみよう
- Python上でSalesforce組織のフォルダーを取得する
- Python上でたった3行でSalesforce組織からのメタデータの取得
- Python上でSalesforce組織の添付ファイルを一括ダウンロードする
About MetaWeblog
XML-RPC
What is XML-RPC XML-RPC Specification
It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.
It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.
Lightning Web Components HelloWorld
The original page link
Lightning Web Components HelloWorld
Topic
In this project, you’ll:
- Install Sublime and Salesforcexytools.
- Set up your
java
andant
environment. - Create and deploy a Lightning web component.
Config Salesforcexytools
How to Config Salesforcexytools.
Please set your api 45.0
Create a Hello World Lightning Web Component
create a Lightning web component.
The Source is From Create a Hello World Lightning Web Component
Create source in sublime, like below:
helloWorld.html
<template> <lightning-card title="HelloWorld" icon-name="custom:custom14"> <div class="slds-m-around_medium"> <p>Hello, {greeting}!</p> <lightning-input label="Name" value={greeting} onchange={changeHandler}></lightning-input> </div> </lightning-card> </template>
helloWorld.js
import { LightningElement, track } from 'lwc'; export default class HelloWorld extends LightningElement { @track greeting = 'World'; changeHandler(event) { this.greeting = event.target.value; } }
helloWorld.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="helloWorld"> <apiVersion>45.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__AppPage</target> <target>lightning__RecordPage</target> <target>lightning__HomePage</target> </targets> </LightningComponentBundle>
Deploy a Lightning web component
Right Click -> Deploy Directory To Server
Select Deploy Direcotry
Click Yes!
Check the log
Add Component to App in Lightning Experience
Please read Create a Hello World Lightning Web Component
Resources
SalesforcexytoolsCore Introduce
The original page link
SalesforcexytoolsCore Introduce
Introduce
SalesforcexytoolsCore is a python library for salesforce. It is base on simple-salesforce
- Sobject Record Management : sobject create, get, get_by_custom_id, update, delete
- Sobject Queries : query, query_more, search, query_allsearch
- Sobject Bulk action
- Run Apex Script
- Metadata Control : describeMetadata, listAllMetadata, getAllMetadataMap, listmeta, listFolder, retrieve, etc.
- Package.xml builder.
- Retrieve Metadata to memory, Retrieve Metadata zip file.
- ApexClass, Trigger, ApexComponent, ApexPage: create, update, delete, get
- Get Apex Log
- Run test class
Requirement
- Python3
- requests
Install
pip install SalesforcexytoolsCore
Document
SalesforceXyToolsCore JP Document
Download PDF
SalesforcexytoolsCore-python-library-for-salesforce(日本語).pdf
About Author : Exia.Huang
Sample Source
apexclass-create.py apexclass-delete.py apexclass-update.py apexcomponent-create.py build-package-xml.py config.py describe-metadata.py download-attachments.py get-all-metadata-map.py get-apexlog.py list-all-metadata.py list-folders.py list-metadata.py package-type-list.py retrieve-metadata-to-memory.py retrieve-metadata-to-zip.py run-apex-script.py run-rest-api.py run-soql-queries.py run-testclass.py sobject-CURD.py trigger-create.py visualforce-create.py
SalesforceXyToolsCore/Python上でApexClassを作成・更新・削除
The original page link
SalesforceXyToolsCore/Python上でApexClassを作成・更新・削除
Topic
- SalesforceXyToolsCoreを使ってApexClassを作成・更新・削除
ApexClassの作成
- Salesforce組織のユーザ名、パスワード、Apiバージョン、Product/Sandboxを設定してください。
from SalesforceXytoolsCore import * import pprint config = { "api_version": 42.0, "username": "sfdc username", "password": "sfdc password", "security_token": "", "is_sandbox": True } tooling_api = ToolingApi(username=config["username"], password=config["password"], security_token=config["security_token"], sandbox=config["is_sandbox"], version=config["api_version"] ) """createApexClass""" name = "HelloWorld" body = """public class HelloWorld { private String mystr; }""" status_code, result = tooling_api.createApexClass(name, body) print(status_code) pprint.pprint(result)
結果確認:
{'errors': [], 'id': '01pxxxxxxxxxxxxxxxxx', 'success': True}
ApexClassの更新
from SalesforceXytoolsCore import * import pprint config = { "api_version": 42.0, "username": "sfdc username", "password": "sfdc password", "security_token": "", "is_sandbox": True } tooling_api = ToolingApi(username=config["username"], password=config["password"], security_token=config["security_token"], sandbox=config["is_sandbox"], version=config["api_version"] ) apexclass_id = "set your apex class id" body = """public class HelloWorld { private String mystr1; }""" tooling_api.updateApexClass(apexclass_id, body)
ApexClassの削除
from SalesforceXytoolsCore import * import pprint config = { "api_version": 42.0, "username": "sfdc username", "password": "sfdc password", "security_token": "", "is_sandbox": True } tooling_api = ToolingApi(username=config["username"], password=config["password"], security_token=config["security_token"], sandbox=config["is_sandbox"], version=config["api_version"] ) apexclass_id = "set your apex class id" body = """public class HelloWorld { private String mystr1; }""" tooling_api.updateApexClass(apexclass_id, body)
その他
Triggerの作成
"""createTrigger"""
tooling_api.createTrigger(tableEnumOrId, name, body)
VisualForceの作成
"""createApexPage"""
tooling_api.createApexPage(MasterLabel, name, markup)
ApexComponentの作成
"""createApexComponent"""
tooling_api.createApexComponent(MasterLabel, name, markup)