Skip to main content

Posts

Showing posts with the label ItemType

Change Keyed Name Length in Aras Innovator

The "Keyed Name" value normally follows "Name" value, and the value may be very long in some special scenarios. Default length of "Keyed Name" Property is 128, but it can't be modified due to system restrictions (see Restriction on Modifying System Property ). All operations on Aras Innovator will be validated before executing command in database. Therefore, it is impossible to modify with AML or configure on system interface. The alternative way is to modify column definition in database directly. Use below the SQL command to achieve: ALTER TABLE [ Table Name ] ALTER COLUMN [keyed_name] NVARCHAR( New Length ) NULL; UPDATE [Property] SET [stored_length]= New Length WHERE [id]=' Property ID '; ※Please use the command very carefully because there is no any system check for it.

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 Property Access with Identity in Aras Innovator

In Aras Innovator, each ItemType links to a table in database. That means the Property links to a column for storing data. If there are access issues for data field, create a Poly Item and Form with particular Identity should be the simplest way to implement. When facing to complicated scenario (maybe various columns and Identity need to be considered together), the future maintenance work might be very difficult. This article provides another thinking to achieve similar result with a little customization. Change Property Access The Property is also an ItemType in system, that means its access can be controlled by system permission. In default, a Relationship will inherits permission from its parent. But in order to control Property access individually, the "Use Src Access" option should be cancelled (see Figure 1). Figure 1 Create Private Permission Open the ItemType which need to create various view (here takes "Part" as example), and follow below s...

Alternative Solution for Querying Date Interval in Aras Innovator

Query data from date range is a common demand, but the Property may not show in main grid. Therefore, users must use "Advanced Search" in order to query these "hidden Property" (like Figure 1). Figure 1 "Advanced Search" should satisfy most of demands. But it is not friendly for users due to the search option contains all Properties. Here propose an alternative solution for easily querying date interval, please follow the steps as follow: Create "Begin Date" and "End Date" Property with "Date" data type. Create a server side Method with below code: Const strQueryProp As String = "created_on" Dim strBegin As String = Me.getProperty("_begin","") Dim strEnd As String = Me.getProperty("_end","") Me.removeProperty("_begin") Me.removeProperty("_end") If Not String.IsNullOrEmpty(strBegin) Then strBegin = RegularExpressions.Regex.Split(strBe...

Delete Workflow Process in Aras Innovator

When initiating a Workflow Map, a new Workflow Process and Workflow will be created. Workflow is a Relationship for recording the dependency of Workflow Process. That means Workflow Process cannot be deleted once source Item exits due to Relationship constraint. As for subflow, it is a kind of Workflow Process. But in the background, system will record which Activity starts the subflow. With above conditions, error message like Figure 1 and Figure 2 will show when trying to delete a Workflow Process. Figure 1. Error message of while deleting Workflow Process but source Item exists. Figure 2. Error message of while deleting Workflow Process but it has subflow. Therefore, deletion needs the following steps: Delete source Item. Delete subflow (if has). Delete Workflow Process.

Restriction on Modifying System Property in Aras Innovator

ItemType must be created with some Properties in order to perform system functions correctly. They are System Property, including: classification keyed_name id created_by_id created_on modified_by_id modified_on current_state state locked_by_id is_current major_rev minor_rev is_released not_lockable css source_id related_id behavior sort_order config_id new_version generation permission_id managed_by_id owned_by_id itemtype release_date effective_date superseded_date team_id If trying to modify System Property, the warning message as below figure will show up. System will throw error when Property is a System Property and the new name is not identical to original name. But there is another logic if Property name does not be changed. The modification of Required, Length, Precision, Scale, and Default Value will affect column definition of database table. When column definition of database table changed, there are 3 rules to prevent illegal modif...

OnChangeCell Event (Property Events)

OnChangeCell Event Fires when cell value changes. Arguments Name Type Description relationshipID String Relationship ID. relatedID String Related Item ID. Default is undefined if Relationship is Null Relationship propertyName String Property name. colNumber String Column number in current grid with zero-based numbering. gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

OnEditFinish Event (Property Events)

OnEditFinish Event Fires after user finishes editing a cell. Arguments Name Type Description relationshipID String Relationship ID. relatedID String Related Item ID. Default is undefined if Relationship is Null Relationship propertyName String Property name. colNumber String Column number in current grid with zero-based numbering. gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

OnEditStart Event (Property Events)

OnEditStart Event Fires before user starts editing a cell. 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 propertyName String Property name. colNumber String Column number in current grid with zero-based numbering. gridApplet Object Grid control object. Details can refer to Aras Innovator official online API guide . See Also Aras Innovator Client Framework

Search Tips for Versionable ItemType in Aras Innovator

Versionable ItemType has Life Cycle to control its states and permission. Although search result will only show the latest version, older versions still can be discovered with AML query. Find All Versions ID will not be Null in any situation due to it is the primary key. Therefore, all versions can be found with this principle. Below is the syntax: <AML> <Item type=" Item Type " action="get"> <id condition="is not null" /> </Item> </AML> Find All Released Revisions There is a Property named "is_released" in versionable ItemType to identify if the Item is released. Below syntax will find all released revisions: <AML> <Item type=" Item Type " action="get"> <id condition="is not null" /> <is_released>1</is_released> </Item> </AML> Find All Old Versions There is another Property named "is_current" in version...

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 )

OnShowItem Event (ItemType Events)

OnShowItem Event Fires when opening an Item, and will overwrite original function. If return false, the action will abort. Arguments Name Type Description inDom Object Item node. inArgs Object An object contains the following properies: viewMode: default is "tab view". isOpenInTearOff: true if Item opens in a tear-off window. See Also Aras Innovator Client Framework

OnAfterNew Event (ItemType Events)

OnAfterNew Event Fires after executing "New Item" or "New Relationship" command. If return false, the action will abort. Arguments Name Type Description inDom Object Item node, but it is an "empty node" having the following attributes: type, id, action, and typeId. See Also Aras Innovator Client Framework

OnNew Event (ItemType Events)

OnNew Event Fires when executing "New Item" or "New Relationship" command, and will overwrite original function. If return false, the action will abort. Arguments Name Type Description inDom Object Item node, but it is an "empty node" only having "type" attribute. See Also Aras Innovator Client Framework

OnBeforeNew Event (ItemType Events)

OnBeforeNew Event Fires before executing "New Item" or "New Relationship" command. If return false, the action will abort. Arguments Name Type Description inDom Object Item node, but it is an "empty node" only having "type" attribute. See Also Aras Innovator Client Framework

Trigger Sequence of Versioning Events in Aras Innovator

There are two actions can handle versionable Item modification: edit: when ItemType's versioning discipline is "Automatic", system will create new version Item when updating. version: create new version Item. Basically, edit action will lock, update, unlock an Item. Therefore, relevant ItemType Server Events include: OnBeforeLock OnAfterLock OnBeforeUpdate OnAfterUpdate OnBeforeUnlock OnAfterUnlock As for version action, mainly triggering below events: OnBeforeVersion OnAfterVersion Edit Action If versioning discipline is automatic, system will execute version action in background. That makes the process is a little complex, trigger sequence of relevant events is shown as Figure 1. Figure 1. Trigger sequence of edit action. Please note, all update and version events will not be triggered when "OnUpdate" event exists (due to this will overwrite original system process). Version Action This action mainly use for manually creating a ne...

Trigger Sequence of Promotion Events in Aras Innovator

There are several Server Event could trigger Method during item promotion: ItemType: OnBeforePromote, OnAfterPromote; Life Cycle: Transition Pre, Transition Post. Trigger sequence of above events is shown in below figure: It's important to note that "Transition Post" cannot rollback while exception throws because item promotion is finished after "OnAfterPromote" That means even if throwing exception, the life cycle will still stay at promoted state. Please note, all above events will not be triggered when "OnPromote" event exists (due to this will overwrite original system process).

"User" item will lose its password while export

There is a column named "PASSWORD" to save user's password inside User ItemType. But if opening the XML file exported by Aras Package Utility, you will find that password data does not exist. Therefore, password data will not be contained if import this kind of package. Use SSMS to execute a query command will find NULL value for PASSWORD column. Maybe this is due to security issue.

Multilevel TOC Category in Aras Innovator

As all we know, the location of ItemType could be defined by "TOC Access". If we want to make ItemType shows inside a multilevel category, the first thing need to do is define them from category source -- List Item "Categories". Use slash "/" to define the position, it is similar to a computer directory path. Here create 5 categories to demonstrate the example: "Cate1" is the root level; "Cate1.1" and "Cate1.2" are the second level; "Cate1.1.1" and "Cate1.1.2" are the third level inside second level. In addition, take Part to show the test result. Add category "Cate1.1.1", "Cate1.1.2", and "Cate1.1" for "world" Identity to "TOC Access" of Part. Save it and re-login, the test result will show properly.