Refresh context item with relationship grid using client side methods

I am facing problem with whenever i added new relationship under relationship tab using client method i write code for tab refresh this tab refresh working fine but add new relationship button is disable so if i want to add new item under relationship i need to refresh or save item.
so i want to do this process automatically , so can you help me refresh context item automatically on client event fired.
or share any solution for refresh all item

Parents Reply Children
  • Hello Maddy,

    you can use following code for refresh the Tab.

    if (aras.getMostTopWindowWithAras(window).frames.relationships) {
    var iFramesCollection = aras.getMostTopWindowWithAras(window).frames.relationships.iframesCollection;
    for (var tabId in iFramesCollection) {
    var relshipTypeNd = aras.getRelationshipType(tabId);
    var relshipTypeName = aras.getItemProperty(relshipTypeNd.node, "name");
    if (relshipTypeName === "RelationshiiptypeName") {

    var topWnd = aras.getMostTopWindowWithAras(window);
    var queryString = {
    db: parent.aras.getDatabase(),
    ITName: document.thisItem.getType(),
    relTypeID: tabId,
    itemID: document.thisItem.getId(),
    editMode: (document.isEditMode ? 1 : 0),
    tabbar: '1',
    toolbar: '1',
    where: 'tabview'
    };
    topWnd.relationships.relationshipsControl.reload(queryString);

    }

    }
    }