Skip to main content
Solved

Custom event on customer order

  • June 14, 2023
  • 5 replies
  • 186 views

Forum|alt.badge.img+9

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

Best answer by dsj

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

5 replies

Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • 8 replies
  • June 14, 2023

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


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 906 replies
  • June 14, 2023

Hi @Hanane 

 

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

 

 


Forum|alt.badge.img+9
  • Author
  • Sidekick
  • 42 replies
  • June 15, 2023

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


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 906 replies
  • Answer
  • June 15, 2023

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


Forum|alt.badge.img+9
  • Author
  • Sidekick
  • 42 replies
  • June 16, 2023

hi Damith , 

 

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