I am calling a backend workflow via a webhook, passing in a date parameter. Using “search for” with constraints of o_date >= p_date:rounded down to day and o_date < p_date:+days 1:rounded down to date fails to find a record. However the same search via the front end using arbitrary p_date works fine.
I feel like I am missing something obvious. Has anyone else ran into this or have a work-around?
Log:
Hi Mike, just had the same thought and double checked. Ignore privacy rules is checked and no privacy roles are setup for the object in question. Thanks for the idea though
Try to perform this same search (using the API) to find the record, but instead of use the right date, try to use two days before, one day before, one day after and two days after.
See if, in one these searches, you find the result.
Yes, it is strange! I have already had the workflow receive and write the data to an object in a step previous to the search. I have even had the search use the saved object dates to make the search rather than the webhook parameters. The is being rec’d and parsed into a date correctly. Also, I have tested sending the webhook from my upstream app as well as a postman call. All fail the search.
So the issue is with the date parameter. If I write the date to the database first, it works. I thought I had carefully tested this and if failed before but I must have been mistaken. A workflow where it writes to the database, then uses the database data to perform the search works. But using the date param to do the search fails. Filing a bug report and moving on for now.