cancel
Showing results for 
Search instead for 
Did you mean: 

How to Refresh the list

Former Member
0 Kudos

Hi All,

I have one query,

I have one hybrid web application like approve/reject sales order.

1st screen: Welcome Screen, On click of button 'Show List' will navigate to 2nd screen and show list.

2nd screen: List of Workitems from SAP Worklist, on selecting row it will navigate to detailed screen.

3rd screen:  details of selected workitem. This screen has 2 buttons(Menu Items) Approve and Reject.

Approve button will approve the workitem and remove the workitem from sap inbox, similarly Reject will reject and remove the workitem from SAP inbox.

So problem is when i set 'menu item' Approve/Reject property "Default Success Screen" as 2nd Screen where i can go back to List, i can see the recent approved or rejected workitem, that is because of it simply navigating not refreshing the list.

So i query is how can i refresh the List when i navigate to 2nd screen again.

Your help will be appreciated.

Regards

Saket

Accepted Solutions (1)

Accepted Solutions (1)

former_member186566
Active Participant
0 Kudos

Hi,

Use custombeforemenuitemclick method.

eample,

if(screen=="Screen2" && menuitem="Approve"){

// form list - through getcurrentmessagevaluecollection()

}

When you form the list, remove the list item which you have approved or rejected, then make it to display the remaining list.

Regards

Yokesvaran.K

Former Member
0 Kudos

Hi Yokesvaran,

Thanks for replying.

Actually i dont want to remove any item manually from list, i want to call MBO again and get fresh list, as if i remove and it may not updated in backend so it may be problem, so want to refresh the list.

Regards
Saket

midhun_vp
Active Contributor
0 Kudos

Hi Saket,

Your MBO will be in online cache policy, change it to "on demand" and keep a refresh button in the list screen with online request and success screen as the list screen itself.

Then hide that refresh button from from Custom.js.

And finally add the menuitem call function of that button as below

function customAfterNavigateForward(screenKey, destScreenKey) {

          if(destScreenKey==="Purchase_Order") {  

                    menuItemCallbackPurchase_OrderRefresh();

 

                              return true;

                    }

Now it will work as you wish

Regards

Midhun

Answers (0)