anyways, the best solution is to use getrawtransaction, which allows you to retrieve any transaction.
Only if your bitcoin.conf has txindex=1 in it. And you've reindexed by running: ./bitcoind -reindex. That will let you run getrawtransaction() on any txid.
To get confirmations for the transaction, as well as the raw and decoded tx, you can use getrawtransaction(txid, 1);