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

  • Hi Satish,

    You can use aras.uiReShowItem(itemId, itemId); inside of a client method to refresh the item form. This should cause the new relationship button to become enabled if the parent item is locked. Note that you'll need to replace itemId in the function code provided with the actual ID of the parent item. 

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

  • Hi Satish,

    Could you please help me on refreshing tab ?

    Regards,

    Maddy.

  • 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);

    }

    }
    }