Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

UI Builder button on Dashboard to trigger a flow

Biddaum
Tera Guru

I have a button that I have added via UI Builder, however it doesn't do anything yet and I do not understand how to add an 'event', so sorry to ask, but I'm looking for a full step by step guild if someone is willing to assist please?

 

Ultimately what I'm wanting to do is use this button to update a user role eg: sn_grc.business_user

 

What I am thinking is to have the button create an event that can trigger a flow and I can do all the bits and pieces in the flow, but I'm certainly open to ideas.

 

The reason the button is there and created via ui builder is because it needs to be available on a dashboard 

 

Open to ideas, but please remember I really need some clear steps on how to create a click event in UI builder as I have not done it before.

1 ACCEPTED SOLUTION

@Biddaum ,the simplest approach for this is using Create Record Data Resource from the UI Builder ,these data resources are like flow actions in the Flow Designer. Screenshot 2026-03-13 at 9.01.43 AM.png

Add a Data resource called Create Record in UI Builder Page,

Click on Add New(+) button and select the create record and click on add and close the dialog.

Now navigate to button you have created and on the right side under events tab there is a event called Button clicked is already available click on event handler and search for execute and select the create record and click on continue

Screenshot 2026-03-13 at 9.08.19 AM.png

 

Then give the table name  as sys_user_has_role and Click on edit field values and select the user as logged in user .To select the logged in user dynamically click on the bind icon which is showing in image and select @context.session.user.sys_id and select the role as sn_grc.business_user and click on apply and save the record and observe the functionality.

Screenshot 2026-03-13 at 9.12.55 AM.png

Screenshot 2026-03-13 at 9.14.38 AM.png

If my response helped, mark it as helpful and accept the solution.

View solution in original post

7 REPLIES 7

@Biddaum ,the simplest approach for this is using Create Record Data Resource from the UI Builder ,these data resources are like flow actions in the Flow Designer. Screenshot 2026-03-13 at 9.01.43 AM.png

Add a Data resource called Create Record in UI Builder Page,

Click on Add New(+) button and select the create record and click on add and close the dialog.

Now navigate to button you have created and on the right side under events tab there is a event called Button clicked is already available click on event handler and search for execute and select the create record and click on continue

Screenshot 2026-03-13 at 9.08.19 AM.png

 

Then give the table name  as sys_user_has_role and Click on edit field values and select the user as logged in user .To select the logged in user dynamically click on the bind icon which is showing in image and select @context.session.user.sys_id and select the role as sn_grc.business_user and click on apply and save the record and observe the functionality.

Screenshot 2026-03-13 at 9.12.55 AM.png

Screenshot 2026-03-13 at 9.14.38 AM.png

If my response helped, mark it as helpful and accept the solution.

@Dinesh Chilaka thanks a heap for your help on this - working great. Only thing is also how would I add a quick message that shows the button click actually did something to the user clicking it?

@Biddaum ,

For this create one client script, 

Under data resources you can find client scripts, create one client script and add the following code there

/**
*  {params} params
*  {api} params.api
*  {any} params.event
*  {any} params.imports
*  {ApiHelpers} params.helpers
*/
function handler({api, event, helpers, imports}) {
 
    api.emit('NOW_UXF_PAGE#ADD_NOTIFICATIONS', {
        items: [{
            id: 'alert_unique_id',
            status: 'info',
            icon: 'check-circle-outline',
            header: 'Heads up',
            content: 'This needs your attention',//add the message that you want to display
            autoDismissConfig: {
                enableAutoDismiss: true,
                duration: 5000,
                showTimer: true
            }
        }]
    });
}

And then click on the create record data resource which you had created before and move to Events tab and click on Add Event Mapping and Select the Operation Succeeded and click on add handler and select your newly created client script.

Screenshot 2026-03-13 at 11.29.27 AM.png

If my response helped, mark it as helpful and accept the solution.