Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Exit Loop Script Step


Cass0509
 Share

Recommended Posts

I'm probably missing something somewhere, but what I have is a loop to go through all selected records and delete the records. How the heck to I exit the loop after the last record is deleted? I'm guessing it's some 'If' statement, but not sure what to use to find out if there are no more records in your found set...

 

Thanks, it advance!

Link to comment
Share on other sites

you don't need to loop through all records. use the script step

 

delete all records[no dialog]

 

this will delete all records in the current found set. Generally, if you loop through records,

 

go to record [next, exit after last]

 

is the script step to use.

 

maarten

Link to comment
Share on other sites

kjoe is correct of course ... you can delete the entire set in one whack. But to answer your question, "How the heck to I exit the loop after the last record is deleted?"

 

To exit a loop when there are no records left (either because of deletions or omit or whatever):

 

Exit Loop If [ not Get ( FoundCount ) ]

 

LaRetta smiley-smile

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use