AnsweredAssumed Answered

Javascript API - get all properties

Question asked by stebans on Jun 25, 2007
Latest reply on Jun 25, 2007 by kevinr
Hi all,

this question may be a bit off topics as it's propably just a Javascript/Java question I'm not familiar with.
I would like to retrieve all properties of, say, "person" from Javascript.
I know we can get a named property with person.properties.MyProperty (person.properties.lastName eg).
As person is a JavaObject and person.properties is a ScriptableQNameMap (if I'm right), i cannot list all properties with a simple "for (prop in person) {…}".
So what is the way to list all properties?

In the same area, what is the best way to list all users from JS API?

As I am with it, what is the way to import javascript libraries (like Prototype) which I'd like to have available for all scripts?


Thanks in advance,
Cheers,
Stéphane

Outcomes