function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yamini BathulaYamini Bathula 

assign an array of strings to custom fields in apex

Hi All,

I have  reuirement to assign an array of strings to be assigned to 9 different custom text fields. This array of strings is a result from an API call. 

can anyone suggest me a way to do this using a loop instead of weriting 9 lines of assignment statements?

Thanks,
Yamini.
ashishashish
Hi,
Here u go!! A brief explanation on creating a class tht returns List of Strings or Array of String ,this will help you make a logic for your solution too.
https://salesforce.stackexchange.com/questions/55941/simple-apex-class-to-return-a-list-of-strings

thanks