I am trying to reference properties in a project script I created so that I can pass in values dynamically to the API I'm calling. What is the best approach to do this? Could you give some feedback on the object traversal methods that should be used. My colleagues were having some issues with this also.
The interface that I created prompts the user to enter a purchase order number in a text field and that purchase order number will get the data that is needed from the API.
Your views (or windows, if Vision) should collect the relevant properties as custom properties in the 'root container' of whatever the most logical unit of organization is.
That is, if you have a data entry view, that itself maybe contains many nested components, themselves possibly inside containers - every piece of data relevant to the data entry itself should be a named custom parameter on the top level. Every inner component should bidirectionally bind to their appropriate parameters.
Then it's trivial to collect the data you care about in scripting, and your inner components aren't so fragile to UI reshuffling, because they're always binding directly to the top-level element(s) they care about.