You need to sign in to do that
Don't have an account?
Jugbeer Bhola
Loop through String <List> to pull values for parameters
Could someone explain how to process a list within a list in APEX code?
String List Example:
List<String>
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI60856},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI54960},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI57656}
There would be three calls within a loop to a service that is expecting the parameters of AgentId and CustomerIds[].
Example:
AgentId = 'AI60856'
CustomerIds[] = '700011326', '507024842', '12345678'
AgentId = 'AI54960'
CustomerIds[] = '700011326', '507024842', '12345678'
AgentId = 'AI57656'
CustomerIds[] = '700011326', '507024842', '12345678'
String List Example:
List<String>
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI60856},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI54960},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI57656}
There would be three calls within a loop to a service that is expecting the parameters of AgentId and CustomerIds[].
Example:
AgentId = 'AI60856'
CustomerIds[] = '700011326', '507024842', '12345678'
AgentId = 'AI54960'
CustomerIds[] = '700011326', '507024842', '12345678'
AgentId = 'AI57656'
CustomerIds[] = '700011326', '507024842', '12345678'
All Answers