London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

AssociationUpdated event in commerce

Vote:
0

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:
0

Is there a better section to ask this question in?

#326668
Aug 07, 2024 14:38
Vote:
0

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.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.