📁 Docs
Script it

Script Salesforce.com app

Plugin

add plugin name:"Salesforce Plugin"
update plugin about:"Salesforce official plugin" pluginVersion:"Version 1.0"

1. Variables

ensure variable SalesforcePluginPackageName kind:"Text"
update variable SalesforcePluginPackageName value:"neome.plugin.salesforce"

2. Forms

a. FormCreateContactInput

ensure form FormCreateContactInput
 
ensure section Details
 
ensure field FirstName type:"text"
ensure field LastName type:"text"
ensure field Title type:"text"
ensure field Phone type:"mobileNumber"
ensure field Email type:"Email"

b. FormContactList

ensure form FormContactList
 
ensure grid ContactSet
 
ensure field Id type:"text"
ensure field FirstName type:"text"
ensure field LastName type:"text"
ensure field Title type:"text"
ensure field Phone type:"mobileNumber"
ensure field Email type:"Email"

c. FormSalesforceConfig

ensure form FormSalesforceConfig
 
ensure section Details
 
ensure field Domain type:"text"
ensure field ClientId type:"text"
ensure field PrivateKey type:"document"

d. FormAccountList

ensure form FormAccountList
 
ensure grid Account
 
ensure field Id type:"text"
ensure field Name type:"text"
ensure field AccountSite type:"text"
ensure field AccountNumber type:"text"
ensure field Phone type:"mobileNumber"
ensure field Type type:"text"
ensure field Industry type:"text"
ensure field BillingState type:"text"
ensure field OwnerId type:"text"

e. FormCreateAccountInput

ensure form FormCreateAccountInput
 
ensure section Details
 
ensure field Name type:"text"
ensure field AccountSite type:"text"
ensure field AccountNumber type:"text"
ensure field Phone type:"mobileNumber"
ensure field Type type:"text"
ensure field Industry type:"text"
ensure field BillingState type:"text"
ensure field OwnerId type:"text"

f. FormCreatedRecordId

ensure form FormCreatedRecordId
 
ensure section Details
 
ensure field Id type:"text"

g. FormGetOpportunityInput

ensure form FormGetOpportunityInput
 
ensure section Details
 
ensure field AccountId type:"text"
ensure field Offset type:"number"
ensure field Limit type:"number"

h. FormOpportunityList

ensure form FormOpportunityList
 
ensure grid Opportunity
 
ensure field Id type:"text"
ensure field Name type:"text"
ensure field Amount type:"decimal"
ensure field Description type:"text"
ensure field CloseDate type:"date"
ensure field StageName type:"text"
ensure field OwnerId type:"text"

i. FormGetAccountsInput

ensure form FormGetAccountsInput
 
ensure section Details
 
ensure field Offset type:"number"
ensure field Limit type:"number"

3. APIs

a. GetContacts

// create GetContacts API
 
ensure pluginApi GetContacts type:"get"
update pluginApi GetContacts outputForm:"FormContactList"

b. CreateContact

// create CreateContact API
 
ensure pluginApi CreateContact type:"post"
update pluginApi CreateContact inputForm:"FormCreateContactInput" outputForm:"FormCreatedRecordId"

c. GetAccounts

// create GetAccounts API
 
ensure pluginApi GetAccounts type:"get"
update pluginApi GetAccounts inputForm:"FormGetAccountsInput" outputForm:"FormAccountList"

d. CreateAccount

// create CreateAccount API
 
ensure pluginApi CreateAccount type:"post"
update pluginApi CreateAccount inputForm:"FormCreateAccountInput" outputForm:"FormCreatedRecordId"

e. GetOpportunity

// create GetOpportunity API
 
ensure pluginApi GetOpportunity type:"get"
update pluginApi GetOpportunity inputForm:"FormGetOpportunityInput" outputForm:"FormOpportunityList"

f. GetAccountsDropdown

// create GetAccountsDropdown API
 
ensure pluginApi GetAccountsDropdown type:"get"
update pluginApi GetAccountsDropdown inputForm:"FormGetAccountsInput" outputForm:"$FormMapOfOptions"

4. Plugin Resources

⚠️
You will have to upload a jar fiel
// create plugin resource
 
ensure pluginResource type:"jar"
 
//You will have to upload a jar file after this step
 
update pluginResource type:"jar" packageNameVar:"SalesforcePluginPackageName"

Deploy

// deploy plugin
deploy Plugin