Skuid page as a Utility Bar Item - Updating Automatically

(This might just be a documentation update idea)

I’m using Skuid to make a Lightning Utility Bar Item as referenced in Salesforce Lightning — Skuid v16.1.9 Documentation

That page warns that utility bar items don’t refresh automatically, and you should add a refresh button to the skuid page. I was using the utility bar to select a ‘current campaign (donation posting batch)’ where the user would be posting donations. I wanted the bar to show counts as they worked on the batch.

I initially used the refresh button as suggested, but then tried using the Skuid event action sequence. It works well!! Go skuid.

When I edit the campain(posting batch) I have an action to publish an event that a posting batch was updated. (to all Skuid and Lightning pages). The utility bar page listens for that event, and requeries its models. So it’s always up to date.

My question, such as it is, is is this a good way to do this? I presume it’ll be as reliable as anything else skuid/lightning.

Also, perhaps the documentation page could be updated to suggest using published events to update the utility bar, vs an ‘after the fact refresh-button’. When I first bumped into the doesn’t refresh the utillity bar page when it’s opened, I was bummed.

That’s really great! To make sure I understand the use case correctly, you have a Skuid page in Lightning main canvas that publishes a “refresh other Skuid pages” event that the Skuid page in the utility bar listens to and update the count accordingly? If that’s the case, that’s definitely a solution I would use to keep pages in different Lightning areas in sync. I can see how that’s a much more elegant solution than a manual “Refresh” button.

In some situations, you can keep certain models in sync automatically when that object is updated by standard Lightning components, and vice versa, changes for the model in Skuid will update the Lightning components. For example, if you have an Opp record model that needs to stay in sync with standard Lightning components (for example, when the Stage is changed in Lightning, update my Opp model in my Skuid page), you can check the “Auto-sync with other Lightning components” box in the Advanced tab for that Model.

Thanks. I didn’t know about the “Auto-sync with other Lightning components” option.
At present, I’m using all-skuid lightning pages. I have some lightning components on them, but just for development. So I can see the fields I forgot to put in skuid. :slight_smile:

My utility bar uses a record type of campaigns (PostingBatch). When the main canvas skuid pages make changes to these campaigns, I send out event like PostingBatchUpdated.

These edits are done on a skuid ‘console’ page with a list down the side and page-include record detail page on the right. The record page posts the event and the utility-bar AND the console list requery when they receive the event.

Works pretty good. If only Skuid would fix the bug that changes the scope when you change the text of the event message… (I posted a bug on that)

here’s that related post: Changing Publish-Event Action "Event Name" changes the publishing scope to "Only this page"

This topic was automatically closed after 24 days. New replies are no longer allowed.