In the vRA plugin, the Server.getObjectsWithCustomPropertyKey() method looks very useful but each time I call it from a script within a workflow the result is empty.
Should this work as the name suggests? What am I doing wrong?
Yes, it should work.
Could you show the scripting code you use to set custom properties and get he objects with this property? Could you provide details of your environment (versions of vRO, vRA plug-in, etc)?
You may also check vRO log files for possible errors reported around the time you set the custom property. And could you check if the issue is valid only for vRA objects, or also for other plug-in objects?