- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 12:48 AM - edited 06-10-2024 12:55 AM
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 01:10 AM
@Community Alums try updating the line 381 as follows.
return 'sys_idIN'+arr.toString()+','+accounts;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 01:20 AM
@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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 01:10 AM
@Community Alums try updating the line 381 as follows.
return 'sys_idIN'+arr.toString()+','+accounts;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 01:18 AM
@Sandeep Rajput Its now working fine. But its taking lot of time to pull the records?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 01:20 AM
@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.