UD Date / DateTime fields cannot be nulled from a BPM

On the BPM it won’t let you do Set Field to DbNull It says DateTime? is not compatible with DbNull…
Maybe in custom code casting it to an object first? (Let me try)

you might be right, its should be just null Interesting ill have to try it, I use alot of nulls.

ttPartRevRow["Date02"] = null;
quoteRow.tqh.ExpirationDate = null;

It does work (from a DB standpoint) it just doesn’t refresh the UI Bound Fields (until you hit refresh again on the UI)

Just tried DbNull that didn’t work either :’(

Your BPM needs to have a ShowMessage widget that displays:

“Record has been Modified by another user…”

:wink:

may i ask what did you use to null the date within your BPM ?

Set Field Widget = null
I also tried C# and I tired DBNull

could you try this [Default(DataTime?)] and see how the UI behave

No luck , same result.

then you are right, it needs to run the refresh command from customisation, it is the same on 10.1.400.20 as well i went round this by hiding the field after setting it to blank

Seem like they don’t want nullabe DateTime’s in BPMs.

You can make nullable variables of other valued types, but not DateTime

image

1 Like

@josecgomez - Was your problem that you cant set a Date or DateTime to null in a BPM?

Or that it isn’t reflected in the UI without a refresh?

While a MD does not allow setting a DateTime field to null, a DD does. So what might work as a hack would be to have a DD that monitors for a specific date (like 11/24/1966) and then changes it to null when when it matches.

It doesn’t reflect in UI until refresh

1 Like

I thought I had ran into this before but I just tried it in 10.2.300.19 and it cleared just fine. I added a UD column on Company with a type of Date and null it, using set field, with a pre-processing directive on Update. No screen refresh needed. Seems like the same use case just possibly a different screen/method and version?

1 Like

I tried ABCCode and Vendor and 2 different Major versions of Epicor. (10.2.200, 10.2.300)
Are you nulling it on the BPM Side?

Yes - I am setting the field to null only in the BPM.

That’s strange… and it is a UD Field? What table?

Did you ever find a solution to this issue? I also have a UD date field that I set to null in a BPM. The date field won’t display as blank until manually refreshing the UI.

Check the Ice.zDataField for that field. I believe it was an issue with default value settings. You can log a call with Epicor to get a data fix.