Question

I have the following line of code in a class:

 Set objDClass = ##class(%Dictionary.ClassDefinition).%OpenId("Dict.ProcCde")

this creates an object reference to the class definition of another class. The Dict.ProcCde class has 173 properties defined. I would like to be able to retrieve an object reference to a specific property by it's property name (which I believe is it's Id) but I'm not sure how to do it short of creating a loop to go through objDClass.Properies one at a time and look for the right property name. When I type in objDClass.Properties. in cache studio I see a number of methods that look like they may work but I can't find any documentation on them or make them work. Specifically, objDClass.Properties.FindObjectId(PropertyName) looked like it would do the trick but doesn't. Other methods that may are: FindExistingObjectId, FindObject but none work. Does anyone know of way to retrieve a %Dictionary.PropertyDefinition object from a %Dictionary.ClassDefinition object by it's property name? Can anyone point me to documentation for the .Properties methods mentioned above?

Thanks

Was it helpful?

Solution

s prop=##class(%Dictionary.PropertyDefinition).%OpenId("Dict.ProcCde||SomeProperty")
or
s prop=##class(%PropertyDefinition).%OpenId("Dict.ProcCde:SomeProperty")

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top