How to get the last cloned date/time of the "current" instance via server-side script?

doctorjim
Tera Expert

I am needing to retrieve the date/time that the last clone was performed on the current (target) instance via server-side script.  Is there some hidden System Property I can fetch with gs.getProperty() or by using some other means?  The date/time only needs to be approximate (+/- 12 hours).  Querying the Clone History table would be very easy on my Production instance except that I need to do this on a non-Production instance.

1 ACCEPTED SOLUTION

Thanks Matthew!   Sorry for the delayed response.   Great info.



I am now considering using the System Upgrades record shown below for determining the clone date/time.


SystemUpgrades.png


This record is generated from the out-of-the-box Clone Cleanup Script shown below.   I am hoping that this cleanup script will be around for the long hall so I can rely on the System Upgrade record it generates above.   Do you have any concerns on the reliability of using this record?


CloneCleanup.png


I am actually using the Upgrade finished date/time value to retrieve a list of Customer Updates created since the last clone was performed.   Here is the URL:   sys_update_xml_list.do?sysparm_query=application=javascript:gs.getCurrentApplicationId()^sys_updated...


View solution in original post

10 REPLIES 10

billlefkoski
Tera Contributor

Since a clone almost always puts a strain on both the target and the source instance you  should be able to find a record in the slow Patterns Table accessed from System Diagnostics | Performance Windows | Latest Upgrade Label = "ASYNC: Schedule Instance Clone"

billlefkoski_0-1714075916645.png