how to set a time delay to populate widget on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 04:01 AM
I have created a widget called "Action" which contains 2 buttons on the request table. when the user submits the request ticket I want to show the widget with 20 seconds of time delay.
How to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 09:06 AM
Hi
you can use setTimeOut() to display widget after a certain time
HTML
<sp-widget widget="c.Widget"></sp-widget>
CLIENT SCRIPT
function(spUtil) { //Submit function
var c = this;
setTimeout(function(){
spUtil.get("widget ID").then(function(response) {
c.Widget = response;
});
},20000);
}
Best regards,
Sai Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 12:04 PM
Did you get a chance to review this?
Best regards,
Sai Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021 05:21 AM
Thank you for you response sai kumar, it works .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021 08:40 AM
Best regards,
Sai Kumar