aras.uiShowItemInFrameEx();

オフライン

Hello, 
Does anyone Know How to open an Item using aras.uiShowItemInFrameEx();
i tried the below way.

const item = aras.getItemById("part","85FA7D64281A404E8AF6596650F50994");
aras.uiShowItemInFrameEx(window,item,'view');

i want to replace the form of an itemtype on button click to the above part item when a button is clicked .

does anyone have any idea how to do this ?
thanks,




Parents
  • Hello,

    There are a few different options here. I'd recommend first to consider using classification-based forms. This way you can get a proper form appearing using OOTB functionality when the user changes the classification of the ItemType.

    One other thing you could do is open the part form in a new tab with aras.uiShowItem

    If you need to completely replace the form, I've found that the following code works from an onClick event of a button at least in R33.

    const partNd = aras.getItemById("Part", "0BB5120838414E36ABAA90DB866B293D")
    aras.uiShowItemInFrameEx(window.frameElement, partNd, 'view')
    // window.frameElement is what's needed to replace the existing form from the context of the onClick event

    Be aware that the form will be re-drawn to the original if you edit/refresh/etc.

  • Hey  , is there a way to make the item editable when using aras.uiShowItemInFrameEx?  We have a use case where we want to display an item's form and would have a button on the form to save/apply the edits.  As of now using the command we seem to just get a read-only version of the form.

Reply Children
  • I am interested in this question too!

    Maybe some idea for you to copy. Make your own buttons!

    I used aras.uiShowItemInFrameEx to get the target form and added a custom "Edit","Save","Abort" and "Refresh" button by myself:




  • オフライン in reply to AngelaIp

    Looks great!  I just found that if the view is set as 'edit' that it'll work for the use-case I want (making it editable), though it's not a total solution as still need to trigger some of the other default behaviors and such.

  • オフライン in reply to AngelaIp

    Trying to get those buttons working is way tricky.  Any useful forum posts or otherwise you might be able to point me to?  Seems a lot of commands aren't available within aras.uiShowItemInFrameEx.  are you using some sort of top.aras.... or otherwise on them?

  • I currently don’t want to fully release the solution publicly. My solution includes one very particular detail. But I’m happy to share some hints via mail. Just send me your email via the notification system.

    The issue is that too many developers from official partners in this forum are just lurking - waiting for solutions and ideas like this without ever contributing anything themselves.

    What’s especially frustrating is that many of them currently actively support and cheer Aras’s decisions regarding the Open Release - decisions that effectively lock people like me out of the software.

    Many just try to flatter Aras to stay in good favor, but this fanboy culture only does harm.