<?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>Purge and float</title><link>https://www.aras.com/community/f/development/3586/purge-and-float</link><description>Hi,

I create Itemtype A and B , both are version controlled and A has B as an item property defined as float.
I create an instance of both and relate instance B to instance A .
I modify both multiple times so they both go up several generations.
When</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Purge and float</title><link>https://www.aras.com/community/thread/1443?ContentTypeID=1</link><pubDate>Fri, 16 Mar 2018 16:11:48 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fd1af92d-c3ef-4a5d-8fcd-af0e68ac412d</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Majorbyte,

There are a few different options here. I believe you could instead define the Item property to be fixed. With a Fixed behavior, each version of A will maintain a reference to a specific version of B. Doing this, when you purge instance A back to a previous generation, it will no longer be referencing the latest generation of B. It will be referencing the same generation of B that it did when the new version of A was created.

An alternative solution would be to add an onBefore server event to ItemType B that updates any references to the latest generation of B to the previous generation. I believe you would want to use an onBeforeDelete server event and add a check to make sure that the action is purge using code like.

&lt;pre&gt;&lt;code&gt;string action = this.getAction();
if (action == &amp;quot;purge&amp;quot;) {
// Update references to previous generation
}&lt;/code&gt;&lt;/pre&gt;


Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>