November Happy Hour will be moved to Thursday December 5th.

AssociationUpdated event in commerce

Vote:
 

I would like some code to run when the AssociationUpdated event in commerce runs. How can I do this?
Previously, I was using a custom CatalogEventListenerBase and overriding the AssociationUpdated event but I am getting a deadlock issue when trying to run the solution with that code in Commerce 14.21.0-14.23.0. Is there a different way of doing this now?

#324037
Jun 24, 2024 17:00
Vote:
 

Is there a better section to ask this question in?

#326668
Aug 07, 2024 14:38
Vote:
 

Hi,

I do not think that we must add a custom CatalogEventListenerBase for it. I suggest that you can use ICatalogEvents to handle AssociationUpdated event instead

For example:

var catalogEvents = ServiceLocator.Current.GetInstance<ICatalogEvents>();
catalogEvents.AssociationUpdated += AssociationUpdate;
#326722
Aug 08, 2024 12:01
agibbles - Aug 08, 2024 13:20
Thank you! That's working for me.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.