You need to sign in to do that
Don't have an account?
Felix Jong Seok Chae
Text Scanner In Apex
In Java, we can easily create a list/set to collect strings in a text file with Scanner object.
What is the equivalent way of scanning a text file in Apex?
What is the equivalent way of scanning a text file in Apex?
https://developer.salesforce.com/forums/?id=906F00000008z7EIAQ
All Answers
1) List
List<String> strList = New List<String>();
2) Set
Set<ID> IdSet = New Set<Id>();
3) Map
Map<String, Integer> stateToZipMap = New Map<String, Integer>();
In addition, you can also use SObject (Salesforce Object) as one of the data type!
e.g.,
List<Account> acts = New List<Account>();
https://developer.salesforce.com/forums/?id=906F00000008z7EIAQ
In the link you provided, OP said a text file is in Document. Is he talking about a document object(table) in salesforce or a directory?
If it is the former one, how do I upload a text file in Document object first?
Document is a standard object in salesforce. It has its own tab out of the box just like how Account object has.
If you don't have "Document" obejct tab already then You can Click + button on salesforce UI Search for Document object and then new button to create a document record.