Python - Can I use .getSyncInfo().toMultilineHumanReadableString() ?

I noticed that some scripts have used item.getSyncInfo().toMultilineHumanReadableString() to display/dump the raw contents of an item. E.g. currency.getSyncInfo().toMultilineHumanReadableString().

So at first glance, this looks like a great and easy way to show a record's contents.

However the API description says:
"save this item to a new SyncRecord and return it. This is a shortcut to SyncRecord r = new SyncRecord(); itemWillSync(r); return r;"

Which infers it's doing some kind of record update. Can you advise what this function actually does and whether it is safe to dump/display a record's contents (without doing any updates - i.e. it's readonly).... AND can it be safely called on any object type (e.g. account, txn, currency, etc etc)

If it's actually a record update, perhaps the function/method name is 'misleading'?

Many thanks

  1. 1 Posted by Stuart Beesley ... on 17 Nov, 2020 10:08 AM

    Stuart Beesley - JUST A FELLOW USER's Avatar

    ??

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac