Solved

Custom event on customer order

  • 14 June 2023
  • 5 replies
  • 139 views

Userlevel 1
Badge +8

Hello everyone , 

 

I need to create a custom event that triggers when the status of the customer order is closed .

My problem is that I can’t find state column ( sql column for status ) in the list of column available in customer_order_tab .

PS : I can find it in the view but not in the table

 

 

Does anyone have an idea how to get it ? 

Thank you in advance.

Hanane

icon

Best answer by dsj 15 June 2023, 23:51

View original

5 replies

Userlevel 1
Badge +3

The view’s “state” column is coming from the “rowstate” column in the Customer_Order_Tab table. 

Userlevel 7
Badge +20

Hi @Hanane 

 

You could also use Application defined event ORDER_STATUS_CHANGE without creating a new custom event ;)

 

 

Userlevel 1
Badge +8

Thank you both for the replies .

I used rowstate but I get this error , do you have an idea how to resolve it .

 

Thank you

Userlevel 7
Badge +20

Hi @Hanane 

For me your code looks ok :|

Do you have any custom attributes in the event which points to customer_order?

 

Otherwise, my suggestion is to use the ORDER_STATUS_CHANGE event. It’s not based on a trigger and you should be able to get the work done.

 

Hope it helps!
Damith

Userlevel 1
Badge +8

hi Damith , 

 

Thank you , I removed the custom attribute and it worked for me ! 

 

Reply