Skip to main content

Timeline for iterating a multidimensional List

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Mar 25, 2018 at 0:12 comment added Bryan since im looping through how would i know where to put date.valueof if i wanted to hardcode where they would go? do i say if index is 6 then date.valueOf(row[index])
Mar 24, 2018 at 23:36 comment added sfdcfox @BryanCerrati Yes, you need to identify the data type and try to parse it via Date.valueOf, DateTime.valueOf, Boolean.valueOf, etc. Have a look at this post I wrote, it's not directly going to help you, but it should (probably) be useful to see how you might dynamically detect the base type of a string based on the input value.
Mar 24, 2018 at 22:01 comment added Bryan i dont understand how to parse data types within the loop
Mar 24, 2018 at 21:58 comment added Bryan i get : System.SObjectException: Illegal assignment from String to Date
Mar 22, 2018 at 20:42 comment added Bryan the csv comes from a third party i dont have access to it until it comes over.
Mar 22, 2018 at 20:41 comment added Bryan how can i set a static header?
Mar 22, 2018 at 20:28 comment added sfdcfox @BryanCerrati if they don't match, you'll need to arrange for a way the user or something to make the fields
Mar 22, 2018 at 19:06 comment added Bryan i dont understand what im supposed to do?
Mar 22, 2018 at 17:00 comment added Bryan i can have the parser keep the headers, but they will in no way match the salesforce field names. so can i create a dummy header that will match the fields? and if so how can i go about that?
Mar 22, 2018 at 16:59 comment added Bryan i edited the post to include the csv parser
Mar 20, 2018 at 21:18 history answered sfdcfox CC BY-SA 3.0