Hi @HBIKKOPPELÂ
I think you need to:
-
Set up a custom event or workflow that monitors when customer order lines are added through the API “CustomerOrderHandling.svc/CustomerOrderLineSet “. This event can trigger a recalculation of the planned ship date based on the external transport lead time.
Or
    2. Customize the logic. You could create a custom field or logic to automatically adjust the               planned ship date based on the external transport lead time whenever a customer order line is         added via the API “CustomerOrderHandling.svc/CustomerOrderLineSet “.
Â
In Summary, What you have to do is;
- Verify if the API call itself includes an option to trigger recalculation.
- Check if there are relevant IFS custom events or workflows that should be invoked after an API call.
- Consider using a combination of IFS custom fields or configurations to ensure that the shipping date updates automatically based on external lead times.
Â
If this answer helps you, please mark it as solved. This will assist other community users who may have similar concerns or need advice.
Regards,
Chanuka
Thanks Chanuka, I ended up adding another api call after creating the customer order to retrieve the external transport lead time. (The workflow that updates this has already ran at this point.) Then we are just passing that value in the customerorderlineset api.Â
Thanks,
KylieÂ
Thanks Chanuka, I ended up adding another api call after creating the customer order to retrieve the external transport lead time. (The workflow that updates this has already ran at this point.) Then we are just passing that value in the customerorderlineset api.Â
Thanks,
KylieÂ
Hi @HBIKKOPPELÂ
Great.
I'm happy to share my advice on this. If you found the answer helpful, could you please mark it as the correct answer? This will allow us to close the thread and make it easier for other community users to find and benefit from in the future.
Regards,
Chanuka
Â
Hi,Â
I got the same issue.Â
I tried to find an attribute called ‘External transport lead time’ in 23R1 CustomerOrderHandling API.
So, I got  PickingLeadtime and DeliveryLeadtime taken from the customer order and sent it withÂ
CustomerOrderHandling.svc/CustomerOrderLineSet POST API as follows.Â
Â
{
 "OrderNo": "1234",
  "PickingLeadtime": 0,
 "DeliveryLeadtime": 0,
 "CatalogNo": "047518",
 "BuyQtyDue": 1
}
Then I got the below error.Â
{
  "error": {
    "code": "DATABASE_ERROR",
    "message": "Database error occurred. Contact administrator.",
    "details":
      {
        "code": 20110,
        "message": "ORA-20110: CustOrdDateCalculation.INVALSHIPDATE: Planned ship date is not within current calendar."
      }
    ]
  }
}
So, I added PlannedShipDate to the same payload as follows.Â
{
 "OrderNo": "1234",
  "PickingLeadtime": 0,
 "DeliveryLeadtime": 0,
 "CatalogNo": "047518",
 "BuyQtyDue": 1,
 "PlannedShipDate": "2025-04-08T00:00:00Z"
}
Then I got the below error.
{
  "error": {
    "code": "DATABASE_ERROR",
    "message": "Database error occurred. Contact administrator.",
    "details": e
      {
        "code": 20121,
        "message": "ORA-20121: CustomerOrderLine.INSERT: Field ÂPlannedShipDate] in Customer Order Line may not be specified for new objects."
      }
    ]
  }
}
Can you please advise to solve this ?
Hello,
I’ve got a very similar problem while importing Customer_Order_Line with a migration job.
If I fill-up the PlannedShipDate with 25/06/2024 00:00 ; while date format is set as : dd/mm/yyyy HH24:MI, then I got the messageÂ
ORA-20121: CustomerOrderLine.INSERT: Field PLANNED_SHIP_DATE] in Customer Order Line may not be specified for new objects.
Â
If I leave this field empty, I got the message :
ORA-20110: CustOrdDateCalculation.INVALSHIPDATE: Planned ship date is not within current calendar.
Â
So I can’t find a work-around!
Any clue or help is welcomed.Â
​@mduchaffÂ
Same situation here. I get the point of not adding PlannedShipDate according to the above comments.Â
However, I am still looking for a solution. The generated calendars cover decades and nothing worked out so far.Â
Hello, we have the same problem, did you find a solution ?
Yes, the minimum content of the payload is follows.Â
{
   "OrderNo": "123",
   "Contract": "1000",
    "CatalogNo": "abc123",
   "BuyQtyDue": 2 ,
   "WantedDeliveryDate": "2025-06-26T16:24:08",Â
   "SalesUnitMeas": "ea",
  "BaseSaleUnitPrice": 20,
  "BaseUnitPriceInclTax": 20,
  "CatalogType": "InventoryPart",
  "Cost": 10,
  "Discount": 10,
  "PriceConvFactor": 1,
  "SaleUnitPrice": 20,
  "UnitPriceInclTax":20,
  "SupplyCode":"InventOrder",
  "ConsignmentStock":"NoConsignmentStock",
  "CloseTolerance": 0,
  "CreateSmObjectOption": "DoNotCreateSMObject",
  "DefaultAddrFlag": "Yes",
  "PartPrice": 20,
  "PriceSource": "SalesPart",
  "PriceFreeze": "Free",
  "ConfigurationId": "*"
}
Thank you ​@Udara Hasantha !