Can anyone explain the differences in behavior of getrawtransaction and gettransaction in RPC? I right clicked the transaction history in the QT client and pasted in the TxID below.

Q1

In the following test, can anyone explain what the purpose of the suffix -000 is and what it's used for?

gettransaction 54b9be14443b152b02ed0b18d27504631cccfa84ce9ada03f9558fbb85b6129c-000


Q2

Why doesn't a raw transaction support the same transaction ID format as the previous command?  (I need to remove the -000 characters)

getrawtransaction 54b9be14443b152b02ed0b18d27504631cccfa84ce9ada03f9558fbb85b6129c-000
ERROR: parameter 1 must be hexadecimal string


Q3

When I enable index=1 in bitcoin.conf and reindex, why can't I call GetTransaction for transactions not in my wallet?  I would like JSON friendly results
Q1: A ledger entry in the wallet view corresponds to a single output of a transaction. The suffix is there to distinguish which output of the transaction is used. It's a bit of strange choice to format it that way; in most places, ':' is used as a separator.

Q2: getrawtransaction queries the memory pool, the set of unspent transaction outputs and the blockchain (if txindex is enabled) for a transaction. It doesn't query a single output, so you pass in just the hexadecimal identifier. You can query individual unspent transaction outputs using the gettxout command (which takes a txid + the output index as separate arguments). You can pass an extra 1 as argument to getrawtransaction to have it decoded, instead of just the raw hex. decoderawtransaction can do this for arbitrary hex-encoded raw transactions. Perhaps this is the answer to Q3.

Q3: gettransaction is a wallet RPC. It cannot operate on anything else, as it needs the higher abstraction layer. It computes debit/credit and fee, which requires identifying which outputs are from/to you, and which are change. This requires knowing what keys belong to you. It does not query the blockchain, but you can use 'getrawtransaction [txid] 1' to get a decoded form of blockchain transactions (with txindex enabled).