Skip to main content
Solved

Retrieve object that triggered business event


Forum|alt.badge.img
  • Jr Varsity III
  • 15 replies

Hi everyone,

I’m using a generic inquiry to trigger a business event. The business event then has a custom data provider as a subscriber to send data to a remote API.

Whilst this is mostly working, I’m trying to use the GI field “Captions” to provide a known name for columns that may have a function attached (or if the user wants to customise the column names). 

At the moment in the EventAction’s Process(MatchedRow[] eventRows, CancellationToken cancellation) method, Captions aren’t pulled through from the GI, only the original field names or randomly generated names for the columns containing functions.

I’d like to be able to get hold of the GI that triggered the business event so I can retrieve the caption names for some of the fields.

Is there a way to get a reference to the triggering object (in this case a GI) within the “Process” method or elsewhere?

Many thanks

Best answer by neil40

Just to update;

It looks like the CreateActionHandler method (from IBPSubscriberActionHandlerFactory) accepts a Guid handlerId which relates to the particular handler in BPEventHandler. From here you can get back to the BPEvent that the handler is associated with (and from there onto whatever triggered the event)

View original

2 replies

Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 15 replies
  • Answer
  • May 5, 2023

Just to update;

It looks like the CreateActionHandler method (from IBPSubscriberActionHandlerFactory) accepts a Guid handlerId which relates to the particular handler in BPEventHandler. From here you can get back to the BPEvent that the handler is associated with (and from there onto whatever triggered the event)


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2658 replies
  • May 5, 2023

Thank you for sharing your solution with the community @neil40 !


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings