Skip to main content

Search

Auto refresh sublist columns

Answered

Comments

2 comments

  • Vladyslav Noskov

    Hello Senad Omicevic

     

    You can add Execute Script Action next to the Action that Open modal dialog of NewForm of data list and try use next code in it:

    var allSubLists = window.Ardevia.SubListsProvider.GetAllSubLists();
    var viewId = "{5FB4CDEA-0139-491A-8716-86ADE403649D}";
    var sublistToRefresh = allSubLists.SBfirst(
      function(item) {
      return item.GetGridInitInfo().jsInitObj.viewId.toUpperCase() == viewId;});

    if(sublistToRefresh){
         sublistToRefresh.Render();
    } 

     

    Replace the 'viewId' variable value with your specific value. To get the view ID for the sub list it is probably easiest to select "Edit Web part" from the sub list web part's context menu, then "Edit current view" in the web part properties and then inspect the opened iFrame where you'll find the View= in the URL query string

     

    Hope it can help.

     

    Best Regards

    Vladyslav Noskov

    0
  • Senad Omicevic

    Hello Vladyslav Noskov,

     

    thank you, it worked and helped me.

    0

Please sign in to leave a comment.