How to get the Sales order Records in saved search...
# general
n
How to get the Sales order Records in saved search which are modified within an hour/30min?@ThanksInadvance
b
Use a relative date filter on the
Date Last Modified
n
by scripting how to get that
I should not hardcode the date time stamp
b
same answer, use a relative date filter
n
By Date last modified I can get the date and fixed time
b
are you trying in the ui first?
n
yes
b
have you selected the filter
n
Yes
b
have you chosen the appropriate operator in the first drop down
n
In filters I have selected the date last modified field there I want to get the results based on the date time stamp
b
that doesnt sound like what you were asking for in the first place
n
In script i want to get the saved search results which are modified with an hour, I can get based on the date
I am not getting based on time
b
what does your code look like
n
I am using a Map/reduce script and i am scheduling for 30 min to update some fields based on the saved search results
Now in Saved search I need a Filter like which are updated with in 30 min those records I should not get in the saved search results.
for the next run
b
sounds reasonable
there is nothing wrong with what you outlined
there are 2 general ways to do what you want
use a relative date for your filter
or use a custom range by creating Date objects
it doesn't sound like you tried to use a relative date filter before, nor would i recommend it for your use case
so normally this would be done by creating a Date object and manipulating it to be the Date that you would set in the ui if you were creating a custom range
im not really sure what you have tried since you havent shared code, but the above are the general steps
n
message has been deleted
Here I dont want to hardcode the time as 1:00 am...I should get the time results as 30 min
b
again, looks reasonable
but if you are having problems with code, you will need to share the code
n
I dont have problem with the code..Problem is with getting the results which are not modified with an hour @ThanksInAdvance
b
make your code add a filter
make it look like the one you add in the ui
n
@battk I am scheduling the Map reduce script for every 30 min - (Table -Sales Order) - For the First Run saved search it should fetch the results which are not updated within 30 min at the time of execution
b
we are still going around in circles
you need to figure out how to add a search filter with a hardcoded date filter
figure out how to do that and then move onto code that can choose whatever Date you want instead of a hardcoded date filter
n
Thanks for your help @battk