UDF Question

I have a need to add another date in Sales Order Entry. I added the UDF and a date field in the header. However, my user also want this to show up in the detail. So I will also need to create the UDF in the OrderDtl_UD for the UDF. My question is, is there a way I can have the detail UDF auto populate to the same as the header if the header date is already populated and the UDF field is empty when creating a new detail line? Would this need to be done via customizations or a BPM?

Would be your friend here, look at PostProcessing BPM on Order.GetNewOrderDtl


Thanks. That’s what I kind of figured, but wanted input before I spent too much time.

So another question with BPM. I am checking if OrderHed have that field populated. Since it’s a date field, it will not let me check for empty/null value. Any ideas?

It seems to work for me, what field are you trying to check?

You could always make the condition “not equal to” and set


and set the expression to some obscure date


Ah thank you.

Yeah I will try the “Null” and if that doesn’t work, can set some fake date.

I figured you had already tried Null, and that wasn’t working

“” or string.Empty is not the same thing as a null.

Consider String.IsNullOrEmpty(String) Method (System) | Microsoft Learn

Yeah I tried null and didn’t work. I also tried the fake date, and didn’t work either.

So what I wanted to do is that if the “NeedByDate” is populated at the header (ttOrderHed.NeedByDate), I also want it to populate a UDF field for a new line record. As a test, I am having it pop-up, but it doesn’t seem to be working. Any ideas what’s wrong with my Post-Processing directive? I would assumed that when I click on “New Line”, I would get the popup if my “NeedByDate” is populate.

Try a message before the condition with a table query to see what is being spit out. Or a message on the false side so you get a message no matter what.




Thanks, that’s a good trick. So once I put my message on the “False” side of my condition, it is popping up the message when I create a “New Line” in the sales order. I think it’s probably the logic of my condition. As a test, I just want the message to pop-up if “NeedByDate” is populated. However, doesn’t seem like that’s correct. Hmmm, not sure how to go about identifying that if the date field is not null and line is new to auto populate the UDF still. It won’t trigger based on the condition.

did you do the field query to see what rows were being returned? Click on the date field and see what’s there.

Not the NULL nugget again :rofl: