Skip to main content

Posts

Showing posts with the label RelationshipType

Relationship Permission Logic in Aras Innovator

A Relationship will inherits permission from its parent when ItemType uses "UseSrcAccess". Although using same permission, the background check logic is a little different. In general, system will check "CanAdd" from ItemType when user executes "add" action, and will check Permission's Access for "edit" and "delete" action. As long as an item is a Relationship with "UseSrcAccess", system will check if "can update" permission of its parent is available alternatively when executing "add" and "delete" action. I guess this kind of design aims for the data safety of adding/deleting Relationship due to user cannot only delete Relationship without editing parent Item in normal situation. But in some customization scenarios, operating Relationship directly is possible (e.g. using AML command).

Control Relationship Tabs in Aras Innovator

According to this article , Relationship tabs are indexed with RelationshipType ID. That means RelationshipType ID is Relationship tab ID. And also, Relatioship tabs are a part of Item window. Therefore, the first step is to get Item window reference. it could easily get with below code: var thisWnd = aras.getMostTopWindowWithAras(window); Enable/Disable Use below code can enable/disable a tab. The parameter "Enabled" is a Boolean, the tab will be disabled if passing false. thisWnd.relationships.relTabbar.SetTabEnabled( RelationshipType ID , Enabled ) Visibility Use below code can control the visibilty of a tab. The parameter "Visible" is a Boolean, the tab will hide if passing false. thisWnd.relationships.relTabbar.SetTabVisible( RelationshipType ID , Visible ) Remove Use below code can remove a tab, but this action is irreversible. thisWnd.relationships.relTabbar.RemoveTab( RelationshipType ID , Item Type )

OnDeleteRow Event (RelationshipType Events)

OnDeleteRow Event Fires when user delete a row in Relationship grid. If return false, the action will abort. Arguments Name Type Description relationshipID String Relationship ID. relatedID String Related Item ID. Default is undefined if Relationship is Null Relationship gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

OnInsertRow Event (RelationshipType Events)

OnInsertRow Event Fires when user insert a row in Relationship grid. Arguments Name Type Description relationshipID String Relationship ID. relatedID String Related Item ID. Default is undefined if Relationship is Null Relationship gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

OnSelectRow Event (RelationshipType Events)

OnSelectRow Event Fires when user select a row in Relationship grid. Arguments Name Type Description relationshipID String Relationship ID. relatedID String Related Item ID. Default is undefined if Relationship is Null Relationship gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

Item Window Layout in Aras Innovator

Every time open an item in tab view mode will append an iframe object (hereinafter referred to as window) to body. At the same time, window will be assigned an unique id which consists of opening time and item's id for identifying. Window layout is defined as below picture. If there are many relationship tabs, they will be stored in "iframesCollection" inside relationships window and indexed by RelationshipType's ID. For example, the ID of "Part BOM" is "159C6D88795B4A86864420863466F728"; therefore, the "BOM" tab could be accessed by below code. window.relationships.iframesCollection['159C6D88795B4A86864420863466F728']