ReloadParentWebpart Use Examples
Basic Use Example
In this example, we are going to look at the list functionality in EASYCommerce. Lists are a feature that allow users to keep a list of items to reference later. Each list has a record in the List Header table which stores information like the name, Owner, and Type. Lists also have records in the List Details table when they contain items. One record will exist in the Details table for each line item in the list.
On this page, you can create lists, edit lists, and remove lists. We are going to focus on the remove list functionality.
When the remove text is selected in the list, the below button process will run. In this process, we delete the list header and list items in the details table, and when this is completed we run the ReloadParentWebpart service.
The reason it is necessary to reload the parent webpart is because the deleted list will remain on the page otherwise. When I select remove for “Documentation Test 2” list, the list is deleted and the page reloads and will now only display “Documentation Test”.
You should note that there are other ways to reload specific areas of the page so that the deleted list is no longer displayed. The benefit of using this service is that one only service needs to be called. This can be helpful if you have to update multiple things in a webpart after clicking a button. If the parent WebPart is relatively small, this will not impact performance. However, in the future, be aware of how this is affecting your page load time. You may want to reload the areas of the webpart separately instead.
This service does not accept any inputs, you just have to drag it on to the process canvas.
This service will return the parent webpartId of the parent webpart that was reloaded in the output.