Question
· Feb 11, 2022

How can I open an object with dynamic class name and id?

Similar to: "set obj = ##class(myClass).%OpenId(id)", which give the an instance of the object with given ID, is there a way to implement a function/classmethod to return the same by providing both class name and ID as a parameter, such as: getObjectInstanceByNameId(className As %String, id As %Integer), using ObjectScript code?

Product version: IRIS 2021.1
Discussion (7)0
Log in or sign up to continue