<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Relationship setup to make related item delete permanently on removal</title><link>https://www.aras.com/community/f/development/3418/relationship-setup-to-make-related-item-delete-permanently-on-removal</link><description>I have an &amp;quot;Order&amp;quot; Item and it has a relationship setup to an &amp;quot;OrderItem&amp;quot;. OrderItems appear in my tabs properly. I would like the OrderItem to be deleted from the system when deleted from the Order. With current setup, when deleted from the Order, the</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Relationship setup to make related item delete permanently on removal</title><link>https://www.aras.com/community/thread/894?ContentTypeID=1</link><pubDate>Tue, 03 Oct 2017 16:57:55 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:30a60d17-4ba0-40a9-822f-c096204dc927</guid><dc:creator>Former Member</dc:creator><description>Chris,

I have discovered that seems to be an order of operations requirement here (SourceItem-&amp;gt;childItem no related method). To make this work, you have to create the source item and the relationship, which then drives the creation of the child item type.

I am yet to find a way to do this by modifying currently existing item types. I confirmed this behavior by attempting to duplicate the properties of the stock models/products structure into my existing structure. This did not succeed. I was able to follow the process described above to success.

Is there something I&amp;#39;m missing to make this work with pre-existing item types, or is it not feasible?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship setup to make related item delete permanently on removal</title><link>https://www.aras.com/community/thread/893?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 10:03:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5c63a45a-47f8-41dc-8bad-9377c7226ab8</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

&amp;nbsp;

There are two different kinds of relationships that can exist within Aras Innovator.

Relationships can exist between different items through the use of a RelationshipType. For example, two Parts can be related to each other through the use of a Part BOM, so the structure of this relationship would look like: Part-&amp;gt;Part BOM-&amp;gt;Part.

Alternatively, items can also have null relationships. An example of this can be seen in the Part Changes relationship which has the strucutre: Part-&amp;gt;Part Changes. Notice there is no second item that the Part Changes relationship connects to.

When an Item is deleted, any child relationships of that Item are also deleted. For example, any Part Changes or Part BOMs that were built off a Part that is being deleted will also be deleted. However, the related Part in a Part BOM relationship is a separate Item and will not be deleted.

Based on my understanding, I believe your data structure looks something like: Order-&amp;gt;Order Relationship-&amp;gt;OrderItem. If this is the case, I think there are two possible solutions in order to delete an OrderItem automatically when it&amp;#39;s parent Order is deleted.
&lt;ol&gt;
 	&lt;li&gt;Convert your OrderItem ItemType into a null RelationshipType. This would also mean that no OrderItem could be created without a parent Order.&lt;/li&gt;
 	&lt;li&gt;Add an onBeforeDelete server event to the Order ItemType that will automatically delete any related OrderItems.&lt;/li&gt;
&lt;/ol&gt;
Also note, that the &amp;quot;Is Relationship&amp;quot; flag on an ItemType is automatically set to true when a RelationshipType is added to an ItemType. Typically, you should avoid setting this flag manually.

In regards to exposing an OrderItem to the TOC, this can be done by configuring the TOC Access relationship on the ItemType. Here you can specify the Identities that should have access to view OrderItems as well as the category in the TOC it should be displayed in.

Chris

___________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship setup to make related item delete permanently on removal</title><link>https://www.aras.com/community/thread/890?ContentTypeID=1</link><pubDate>Sat, 30 Sep 2017 22:33:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:62eb8414-351e-45e3-aa03-c72a530be9f1</guid><dc:creator>Former Member</dc:creator><description>Also, when I have &amp;quot;Is Relationship&amp;quot; turned on, I get the following error when trying to save my parent item, Order, with attached relationship items OrderItem

Property with name=source_type is not specified for &amp;#39;for all&amp;#39; relationship.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>