aras. uiReShowItem how to use ?

オフライン

In one of my requirement after hide / show relationship grid column based parent field value, I want to refresh Item form/grid to see changes done. For this purpose I am using 

aras.uiReShowItem in onformPopulate event it keeps on loading item. And item doesn't get load. 

Can someone explain how can I fix this? 

Also of you have api on how to hide. Show relationship column s please share it. 

Thanks. 

  • Did you try like this

    Hide Column:

    parent.findCurrentRelationshipsTab().document.getElementById('gridTD').children[1].getElementsByTagName('th')[ColumnIndex].setAttribute('style','display:none;');

    and
    top.aras.uiReShowItemEx(this.item.id,this.item);

  • 0 オフライン in reply to ArG

    Thank you for your reply .

    This API worked well when added onChange event as based on dropdown value I want to hide/show coloumns .

    But if save and reopen the Item grid changes are not displayed (It doesnt hide show any coloumn). To overcome this I added method onFormPopulate Event on the form . But it didnt worked . It shows below error.

    How can I handle this ?

    Internal Error: event handler failed. Event handler failed with message: TypeError: Cannot read properties of undefined (reading 'getElementsByTagName') [function onload$user$handler(e)
    {
    try
    {
    if (onload1(e) === false)
    return false;
    if (onload2(e) === false)
    return false;
    }
    catch (exp)
    {
    aras.AlertError(aras.getResource('', 'ui_methods_ex.event_handler_failed'), aras.getResource('', 'ui_methods_ex.event_handler_failure_msg', exp.description ? exp.description : (exp + ' [' +arguments.callee.toString()+ ']')), aras.getResource('','common.client_side_err'));
    return false;
    }
    }] Client Side Error

    Thank you .

  • 0 オフライン in reply to Kara

    is it possible to share code?

  • 0 オフライン in reply to Kara

    Add code if relationship is loaded, then hide th & tr of required relationship.

    Assuming the relatioship tab is first tab