Skip to main content

Hi All,

 

We are experiencing an issue where we cannot cancel the shop order, which is linked to a customer order. Customer order is in invoiced/closed status.

 

I tried to unpeg the customer order from the shop order, and I’m getting the following error.

I tried to replicate the scenario in the test environment, and it was unsuccessful since I can cancel the shop order even after invoicing the customer order line.

I found the following article in the community,

Greatly appreciate it if you can help me find a solution for this.

Thank you.

 

Kind Regards,

-Kavinda Jayaratne 

 

Once a customer order line is invoiced/closed, the system locks the pegging relationship, preventing unpegging or cancellation of the linked shop order.

This is a safeguard to maintain data integrity between supply and demand records.

In some cases, the pegging should have been converted into a reservation when the shop order was closed, or parts were received. If this didn’t happen correctly, the system may block further actions.

Here are the next steps I would suggest:

  • Confirm the invoice status of the customer order.
  • Check whether the shop order has received quantities or is in a closed state. If needed, you may have to unreceive and unissued materials before retrying.
  • If standard unpeg fails, consider raising a technical case with IFS support to explore a data repair or script-based unpeg. If necessary, apply a safe correction.

Hi ​@imkhin 

In this case customer order has used stock from the inventory to deliver without relaying on the shop order.

Shop order is in Planned status and no any recives were performed against the shop order.

Thank you.

Kind Regards,

-Kavinda Jayaratne


Hi ​@Kavinda_Jay,

Do you have any custom events in place in the environment where this issue is observable? For example, is there any event which is declared for the table CustomerOrderLineHist?


Hi ​@Yathartha Karunananda ,

 

There is a custom event for the table CustomerOrderLineHist.

 

Thank you.

 

Kind Regards,

-Kavinda Jayaratne 

 


Hi ​@Kavinda_Jay,

Did you try to cancel the shop order after disabling that event? 


Hi ​@Yathartha Karunananda 

We didn’t try that since it is in the Prod environment.

We were not able to replicate this in non-prod environment.

Can we replicate this?

Thank you.

Kind Regards,

-Kavinda Jayaratne


Hi ​@Yathartha Karunananda 

This custom event is in the Test environment as well.

However, I was not able to replicate the issue.

Thank you.

 

Kind Regards,

-Kavinda Jayaratne


Hi ​@Kavinda_Jay,

The best way to get to the root cause would be to copy the production environment to a non-prod setup and debug the code there. You could also try disabling the event to see if it helps. Keep in mind that the data in the affected record in PROD might not match what you recreated in non-prod - that could be why you weren’t able to reproduce the issue.

Regards,

Yathartha


Hi ​@Yathartha Karunananda,

That is correct.

We will try that.

Thank you.

Kind Regards,

-Kavinda Jayaratne