Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Setting Up Configurable Actions for Custom Components

Devin V_
Giga Expert

Hello All!

Has anyone had any success with creating a dispatched event (event handler) for a custom component. My goal is to setup an event handler for a custom component so that further actions can be tied to that event handler via the UI builder.

I have read through countless articles and watched many videos, and I have not seen a single instance where those presenting were able to successfully deploy a component with a dispatched event (i.e. the event handler) associated with that component's macroponent record.

I've begun to dig through the source code contained within @servicenow package within node modules of a custom component's project scaffolding, but I figured I should reach out to the community while I begin this process.

A good example of something similar that already exists is the now-button component. An even better example would be the simple list component included OOB. The list component is a better example because I need the payload of my action in the custom component to be available within ui builder, which is something the the list component provides.

Ideally I would like the url of a repo where a custom component has been able to achieve this that is NOT provided by ServiceNow. Or even better yet, if someone could just explain to me how they achieved this I would be eternally grateful.

Thank you!

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Devin,

Have you looked through this yet?

https://developer.servicenow.com/blog.do?p=/post/quebec-ui-builder-custom-component-events/

It's been a while but I was able to deploy and component, do some configuration with the macroponent, then use the component's event in UI Builder.

View solution in original post

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Devin,

Have you looked through this yet?

https://developer.servicenow.com/blog.do?p=/post/quebec-ui-builder-custom-component-events/

It's been a while but I was able to deploy and component, do some configuration with the macroponent, then use the component's event in UI Builder.

Devin V_
Giga Expert

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Thanks for posting that!

So how to config payload to this action. I still have no clue to do it. How could tutorial skip that important part ? 

 
"payload": []​

see it in video. It is not correct way, right?