Created
December 17, 2019 15:13
-
-
Save pramodya1994/9dafcb68d73864c01c4e9ea5df57e6b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function main() returns error? { | |
// Create salesforce bulk client. | |
sfdc46:SalesforceBulkClient sfBulkClient = salesforceClient->createSalesforceBulkClient(); | |
// Create CSV insert operator. | |
sfdc46:CsvInsertOperator csvInserter = check sfBulkClient->createCsvInsertOperator("Contact"); | |
// Read CSV file content. | |
io:ReadableByteChannel contacts = check io:openReadableFile("sfdc contacts - sheet1.csv"); | |
// Import csv contacts to Salesforce. | |
sfdc46:BatchInfo batch = check csvInserter->insert(<@untainted> contacts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment