How to Send Event from Page Collection to Parent Page in UI Builder?

SundaramR
Tera Guru

Hi,

 

I'm trying to send a custom event from a Page Collection page to its Parent Page in UI Builder.

When using a Subpage, I was able to successfully emit and handle the event in the parent using the SEND MESSAGE event in the Variant Event Mappings. However, when using a Page Collection, I’m not seeing the same behavior.

Specifically, in the SEND MESSAGE Relay (Default) section of the Variant event mappings, I'm trying to add a SEND MESSAGE event — but this event isn't available for the Page Collection.

I followed the steps from this post:

https://www.servicenow.com/community/next-experience-forum/ui-builder-page-collection-bubble-event/m...

 

…but haven’t been successful in getting the event to bubble up from the Page Collection to the parent page.

Does anyone have the proper steps or workaround for sending custom events from a Page Collection to the parent?

 

adding image from subpage and page-collection body event.

 

Thanks in advance! 

6 REPLIES 6

@Brad Tilton  Thanks for the response. Is there any documentation or reference implementation PC to send event to parent page? I am stuck on this for a week. looking for some help.

You're not actually passing an event to the parent page, but you're able to call an event handler on the parent page's controller. When you go to add an event handler to an event on your page collection page you should see all of the event handlers associated with the parent page's controller available. That's how the PC page communicates with the parent page. 

You can see an example of that from a knowledge lab we did last year: https://servicenownextexperience.github.io/labs/CCL1200-K24-Adv-Workspaces/ex2/overview