Hello, can anyone point me where I am wrong? I am...
# suitescript
s
Hello, can anyone point me where I am wrong? I am creating a search in a script and will use script parameters as their values. Then will use that search to delete records. My filter is [“created”,“before”, searchfilter] where searchfilter is a text field in the script deployment i.e fivedaysago for testing and sixtydaysago for actual criteria needed when I ran the script, it did not delete the fivedaysago that was set, instead it deleted every record in that custom record list except the newly created one. Any thoughts?
w
"before six days ago" could mean almost all records... It depends on when they were created. But it should leave all records created in the last five days.
I'd say that you should test you're search in the console first to verify the results before running it in a script.
s
The records that were deleted was from 2020. So if I want to capture records that was created on or before ‘days ago’? Which selector should I use?
w
That seems right. 2020-mm-dd was before 2021-12-08