Solved

How to update Customer Order Line Planned Due Date?

  • 18 December 2023
  • 5 replies
  • 208 views

Userlevel 5
Badge +15

Hello,

 

I am currently attempting to update a Customer Order Line planned due date variable via a workflow projection call. Please see below for the call. I have formatted the date to the correct syntax.

I get the following error when trying to update the Planned Due Date

ORA-20120: CustomerOrderLine.UPD_TIME_ONLY: You may only change the time for [PLANNED_DUE_DATE]! ORA-06512: at "IFSAPP.ERROR_SYS", line 140 ORA-06512: at "IFSAPP.ERROR_SYS", line 702 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_LINE_API", line 24230 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_LINE_API", line 25290 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_LINE_API", line 19070 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_LINE_API", line 19125 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_LINE_API", line 19138 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_HANDLING_SVC", line 40640 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_HANDLING_SVC", line 40680 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_HANDLING_SVC", line 40684 ORA-06512: at "IFSAPP.CUSTOMER_ORDER_HANDLING_SVC", line 13891 ORA-06512: at line 1

Does anyone know how to resolve this? I have another workflow with the exact same projection call and it works fine

 

Thanks,
Bryan

icon

Best answer by bdoucette 23 January 2024, 21:24

View original

5 replies

Userlevel 3
Badge +7

It seems like the date portion of ‘PlannedDueDate’ can’t be updated. Only the time portion can be updated. You are not updating the date from the Workflow are you? If you can you show how VarDate is set that might be helpful.

Userlevel 5
Badge +15

Hi @Lahirumala de Mel 

This is not true as I have another workflow that can update this date completely fine.

I have tested this workflow multiple times and it works. The only issue is the other workflow, which has the exact same call. The only difference is that the input for the date in this call is for the wanted delivery date, and the input for the problematic workflow is varDate, which I define in the following:

var wantedDate = new Date(execution.getVariable('WantedDeliveryDate'))
var currDate = new Date()
varDate = new Date()

if (wantedDate.getTime() > currDate.getTime()) {
execution.setVariable('varDate', wantedDate)
} else {
execution.setVariable('varDate', currDate)
}

varStrDate = varDate.toJSON().substring(0,10);

varStrDate += '-00.00.00.0000000'

execution.setVariable('varDate', varStrDate);

Thanks,
Bryan

Userlevel 3
Badge +7

The Workflow team at RnD tried this out but it seems to give the same result in postman as well. This seems to be related to the business logic performed in the API. Might be helpful to understand how the validations are handled in the API. I’m afraid I’m not the person to comment on that.

Userlevel 5
Badge +15

Hi @Lahirumala de Mel 

 

Did you ever bring this up to RnD on how to handle this?

 

Thanks,
Bryan

Userlevel 5
Badge +15

Hi @Lahirumala de Mel 

 

A workaround that is working for us is to change the planned delivery date, which indirectly changes the planned due date without modifying the wanted delivery date (which we dont want to change).

 

Thanks,
Bryan

Reply