How to combine array to sys_id

Community Alums
Not applicable

 

 

 

Hi Team,

 

Below is the function of script include and below is the issue:

Line no 381 is taking time to fetch the records when I do lookup, total no of records is just 18 in my case.

I want to add the value of result in Line  376  to 379 so that I can return all accounts name which are there in 376 and 379.

Kindly help me in resolving the same.

 

 

Ankur20_0-1718005474106.png

 

2 ACCEPTED SOLUTIONS

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums try updating the line 381 as follows.

 

return 'sys_idIN'+arr.toString()+','+accounts;

View solution in original post

@Community Alums It will take time as you are you having nested while loops which is causing the delay. You need to refactor your logic to see how the nested loops can be avoided.

 

Since I addressed your original question, please mark the response as accepted solution.

View solution in original post

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums try updating the line 381 as follows.

 

return 'sys_idIN'+arr.toString()+','+accounts;

Community Alums
Not applicable

@Sandeep Rajput Its now working fine. But its taking lot of time to pull the records?

@Community Alums It will take time as you are you having nested while loops which is causing the delay. You need to refactor your logic to see how the nested loops can be avoided.

 

Since I addressed your original question, please mark the response as accepted solution.