tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/1204-creating-transactionsInfinite Kind: Discussion 2015-06-06T04:02:29Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/370117422015-06-02T14:52:01Z2015-06-02T14:52:01ZCreating Transactions<div><p>The old IDs are deprecated and shouldn't be used anymore.
However, if you'd like to make sure that something is there you can
do something like passing System.currentTimeMillis() to get
something that <em>should</em> be unique but not necessarily.</p>
<p>The problem with the old IDs is that they can't ever be
guaranteed unique now that syncing is a built-in function.</p>
<p>Thanks,<br>
Sean</p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/370117422015-06-03T06:18:57Z2015-06-03T06:18:57ZCreating Transactions<div><p>Thanks Sean<br>
I would need all transactions to have a unique number so I will
drop it.</p>
<p>What is the best way to sort transactions so they are in entered
sequence?</p>
<p>Regards<br>
Mike</p></div>Mike Bray (Quote Loader Author)tag:infinitekind.tenderapp.com,2009-01-14:Comment/370117422015-06-03T15:29:29Z2015-06-03T15:29:29ZCreating Transactions<div><p>I would recommend using the TxnUtil.DATE_ENTERED_COMPARATOR to
sort the transactions. That can be used in java collections or in
the TxnSet.sortWithComparator(...) method, but only in relatively
recent builds. I think that API is clean enough that it's worth
bumping the requirements to a recent build.</p>
<p>Also, FYI, I'm going to be pushing the current preview of
MD2015.4 out as a stable release either today or tomorrow
(hopefully), so targeting that build number will probably get a
good number of users pretty quickly.</p>
<p>Thanks!</p>
<p>Sean Reilly<br>
Developer, The Infinite Kind<br>
<a href="http://infinitekind.com">http://infinitekind.com</a></p></div>Sean Reilly