I would like to look up the rids of some objects and capture them in an array of strings for reference or further use elsewhere.
Asked
Active
Viewed 158 times
1 Answers
0
We can answer this easily, we can pass the object set of interest as an argument into the function. Then the following will return their rids. We can then return them or write them to an object property. Note that this will not fetch any rids for any objects I only just created in the same function.
myObjectSet.allAsync().then(objs => objs.map(x => x.rid!))

fmsf
- 36,317
- 49
- 147
- 195

Benjamin Ahnert
- 101
- 1
- 6
-
Does anyone know how to get the RId of an object set passed into a function? – Benjamin Ahnert Mar 30 '22 at 19:34
-
Having inquired into this, it's currently not possible to return an object set's RId with object functions. – Benjamin Ahnert Apr 06 '22 at 11:59