Set RequestDate when NeedByDate Changes

I have a client running Kinetic 2024.2 on the cloud. There was a BPM that set the Ship By Date to an earlier value when the Need By Date was changed on the Order. It no longer works (not 100% sure it worked since the upgrade from E9). The Ship By Date gets set the same as the Need By Date.
Is this a new setting or a new functionality?

Here are the details:
Method Directive - SalesOrder.ChangeNeedByDate (post-processing)
Code check which table and record was changed and does some calculation to set the date. The correct date is getting set in the code (tested with a PublishInfoMessage).

I can write a lot more code to fix this, but I am curious if others have had the same problem.

There is somewhat new functionality for calculating the need by date based on the ship by date based on the “delivery days” in the customer records. This is probably what you are running into. if the delivery days is zero then the dates would be equal.

Thanks for the response @timshuwy! A couple of additional questions:

  1. Does this read the Customer table or the ShipTo table?
  2. Is this the DemandDeliveryDays or a new field?
  3. Does the NeedByDate set the RequestDate or the other way around?
  4. Does this affect the OrderHed, OrderDtl, and OrderRel?

Somebody could correct me if I’m wrong about any of the following… the field @timshuwy mentioned is new. I know it’s on the customer form. Not sure about individual ShipTos… i would check in Data Dictionary to verify. Makes sense that it should be as different ShipTos could take different lengths of time to get parts to.

Of course the delivery days also depend on the freight method, so, you can set a default on the customer but you should be consistent in saying it is the ground transportation days, or something. You can always get it there faster if you so it overnight express or air freight.

The NeedByDate is when the customer NEEDS it at their site (the day it should be delivered).

The RequiredByDate is the date we are required to ship it. So this is the date manufacturing is REQUIRED to have it ready. This is the date the system uses as the job end date (when scheduling backwards).

So, the NeedBy should drive the RequiredBy.

The customer NEEDS it on the 5th. The Customer DeliveryDays is 2 days… so the initial RequiredBy should be set at the 3rd.

OrderHed dates are just settings that then transfer down as defaults to the lines and releases. You can leave them blank if you want. And/Or override the values at the Line and Release levels. Not all lines need to be the same, nor match the Hed dates… Not all releases need to match the dates on the lines.

The Release level needs to have the dates to drive demand… if there’s no date on the release the system won’t know when to schedule the job, or know dates to use on purchasing suggestions, etc.

3 Likes

Question 1: Answer is “Yes”… if you dont have a shipto, then it uses the days from the customer. If you specify a shipto, then it uses theri delivery days info
Question2: I am not totally certain of the answer, but I believe that it has always been there… I believe that I created BPMs in the past to use this field to do very much what we did in this final solution.
Question 3: You populate the NeedByDate, and the Request date is populated. ALSO, if you change the ShipTo Address, then it will recalculate the Request date too, overriding what was there.
Question 4: Answer is “yes”… all three places.

1 Like

I found the Customer.DemandDeliveryDays and ShipTo.DemandDeliveryDays are the correct fields. However, does this only work for EDI/Demand? I can’t get it to work at all.
I also see a new field which covers what the BPM is supposed to do:
image

Here is my setup:
I set the Customer.DemandDeliveryDays = 25 (it is disabled, so I used an updateable BAQ) and the ShipTo.DemandDeliveryDays = 5

What I have tried (in all variations of this logic):
Company Config field checked and unchecked
Customer > Ship To > Demand > Use Customer Values checked and unchecked
Code on ChangeNeedByDate enabled and disabled (pre-processing and post processing).

Can someone verify this functions as intended? Currently it appears new logic actually broke the ability to set the Ship By Date fields.

The delivery days fields have existed since at least my version (10.2.400) and we use them. In our version the functionality to programmatically set the Ship By based on the Need By and the delivery days value only applies to orders imported VIA EDI. The ability have this functionality apply to non-EDI orders is what is new.

Orders imported VIA EDI seem to use different BOs than an order keyed in manually, which may explain why your thing that was once working is now broken.

@timshuwy For our EDI orders, we also have the ability to further modify the Ship By date using Periodicity. Do you know if this also applies to manually keyed in orders in the later versions?

Yes, those fields existed in E9 (maybe before).
The problem I have is that this is not using EDI, but it appears to be preventing a BPM on Post-Processing ChangeNeedByDate to set this value.

Yes, they recently expanded the functionality to apply to non-EDI orders, so this new logic might be stepping on your existing BPM.

I tried disabling the BPM and it still fails to perform as described.

There may be another setting you need to look at, Date Type:

image

For us, we can change this between ‘Shipping’ and ‘Need By’

It seems to be the date you want it to watch for changes to, or, work from and apply logic to the other. I think thats what it does, I just know when I have it set to Need By it works.

@Jason_Woods Not sure if this is the same issue, but we are running into this:

The system is supposed to change the Ship By Date when you set the Need By Date, the first time, but the system is now changing it every time. If you have Delivery Days set to 0, then it should not be changing it every time. Problem PRB0292533 was created for this issue. The system should still change it the first time, but not after that.

In this case, I am not seeing the logic work EVER. I have the BPM turned off to review the Epicor logic.

Hi Jason, this is what I found from Field Help for the Delivery Days field:

“Note: This parameter only applies to calculation of Need By dates for orders that are generated by the Demand Management module. It does not apply calculation of Need By dates for orders that are directly entered into Sales Order Entry.”

1 Like

Yes, however, after 17 years of working with this software, I have found that the field help can often be lacking. :slight_smile:

I can take this help information a number of ways:

  1. If you do not have Demand Management, then there is no calculation (definitely no the case).
  2. If you do not have Demand Management, then the calculation will force zero days (not stated in the help)
  3. If you do not have Demand Management, the calculation will run anyway (definitely no the case).
  4. The field help is wrong, and something else is happening that is not documented.

I do really appreciate the continued help on this. So far we have not heard from support on this and I do not have binaries I can review for looking under the hood…

I used the AI agent in the newest version and it confirms what SHOULD work…

Yes, it is possible to set the Ship By Date automatically when the Need By Date is changed in a sales order. You can achieve this by setting the Delivery Days value at the Customer or Ship To level. Here are the steps:

Set Delivery Days Value:

  1. Navigate to the Customer or Ship To level.
  2. Set the Delivery Days value, which specifies the number of days required to ship a part quantity from your manufacturing center to the customer’s location.

Create a Calendar for Non-Working Days:

  1. Go to Site Configuration > Shipping/Receiving > Shipping Calendar.
  2. Set non-working days to ensure the system moves the date backwards to the first working day if it falls on a non-working day like weekends.

Order Entry:

  1. Enter a new order and specify the customer.
  2. Enter the Need By Date. The system will automatically calculate the Ship By Date by subtracting the Delivery Days from the Need By Date.
  3. If you change the Order Release Ship To that has a different value for delivery days, the Ship By Date will be adjusted accordingly.
  4. If you change the Need By Date, and there is a delivery days value, you will be prompted to change the Ship By Date.

The Ship By Date is calculated as follows:

Ship By Date = Need By Date - Delivery Days

2 Likes

This was a new feature (more precisely, an addition of functionality to an existing feature) in 2024.1

Kinetic 2024.1 Feature Preview - Delivery Days

The actual fields are the same as before (Customer.DemandDeliveryDays and ShipTo.DemandDeliveryDays). Previous to this these values ONLY worked with EDI (if you wanted to use them on non-EDI orders, you had to write BPMs)… now they work on any Sales Order.

At least that’s the design. I haven’t actually tried it yet.

Thanks. This is why we have a ticket into support :frowning:

The feature works fine on the Kinetic interface but not the Classic UI. Is it safe to assume that all your testing was in Classic?

FYI Epicor Support created PRB0283317 for the bug fix.