Info |
---|
Since Cloudaware is built on force.com, address Salesforce CLI which is a powerful command line interface that simplifies development and build automation when working with your Salesforce instance. |
...
2. Open Terminal and run the command sfdx
to make sure the application was successfully installed.
...
Create a
...
Private Key and
...
Self-signed
...
Digital Certificate
The JWT-based authorization flow requires a digital certificate and the private key used to sign the certificate. You upload the digital certificate to the custom connected app that is also required for JWT-based authorization. This process produces two files:
...
openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
Create a
...
Connected App in
...
Your Salesforce
...
Org
1. Log in to Cloudaware account.
...
13. Optional: if you would like to allow all users access the app using their credentials in CLI, select the app → Edit policies → select 'All users may self-authorize' in the 'OAuth Policies' section.
Authorize a Salesforce
...
Org for
...
Use with
...
Salesforce CLI
1. Open Terminal and run the following command: sfdx force:auth:jwt:grant -u ‘text’ -f ‘text’ -i ‘text’ -a ‘text’
...
You have successfully authorized your Salesforce org for use with the Salesforce CLI.
Execute a
...
Sample SOQL
...
Query
Note that you must use API names to run SOQL queries against Cloudaware objects and fields. To locate API names, go to Setup → Create → Objects → select an object in question.
...
instanceID | Demo Version |
---|---|
i-XXXXXXXXXXXXXXXXA | 3.4 |
i-XXXXXXXXXXXXXXXXB | 3.7 |
… | … |
i-XXXXXXXXXXXXXXXXZ | 3.2 |
Using CLI, we will now need to extract instanceID and Salesforce ID in order to create a Salesforce-side dataset that will look like this:
sfdx force:data:soql:query -q "Select Id, CA10__instanceID__c CA10__CaAwsInstance__c where CA10__disappearanceTime__c =null" -u your SFDC username
If you 're are not sure how to create a custom field on an existing object such as EC2 Instance or Physical Server, follow the instructions here.
...
Salesforce ID | instanceID |
---|---|
a0X4P00000KUkVSUA1 | 3.4 |
a0X4P00000KUkUTUA1 | 3.7 |
… | … |
a0X4P00000LJsniUAD | 3.2 |
We will now use sort and merge commands to create a final dataset that will be used to upload the merged dataset. In this merged dataset, records are matched by instanceID but the actual instanceID does not need to be re-imported.
...