Also possible dumb question, are you sure your UD field is in a datetime format? Only because we had a customization cowboy create a text field people were supposed to just always use yyyy-mm-dd format in.
If your field is a DateTime, that means it has a time component, which the Today may not.
You need to compare just the date portion of your FUDate_c field. Because:
08/22/2020 09:34:12 != 8/22/2020
FWIW - Somewhere between 10.1.400 and 10.2.300, some date fields in db tables were changed to DateTimes. So my BAQs that were comparing the PostDate to a user supplied date, would never match.
Thanks @danbedwards, your first example is what I was looking for and it works, the strange thing is, in any other BPM where I’ve referred to a UD field I’ve had to use the square brackets
@SteveFossey, I’ve had a look at a few foreach statements and have not seen . FirstOrDefault() used
, and I was trying to return all fields not just the PONum
@ckrusen, thanks for the pointer, earlier I had hard coded a PO in so I could check what the date fields were returning, they were returning 23/08/2020 00:00:00 (Australian format)
When referencing columns within a temporary table, like ttPOHeader, you must use brackets around UD columns - or there are other methods. For Db tables, like Db.POHeader, there is no need for the brackets. There are many more details, but this is the simple explanation. Hope that helps.