Hi,
Try the following code. It only works if the class parent is Ens.DataTransformDTL
// Create a query to get only my class (in MyClass and sub folders) set query="SELECT ID FROM %Dictionary.ClassDefinition WHERE ID LIKE 'MyClass.%' AND super='Ens.DataTransformDTL'" set tStatement = ##class(%SQL.Statement).%New() set qStatus=tStatement.%Prepare(query) set tResult = tStatement.%Execute() while tResult.%Next() { set dtlName = tResult.%Get("ID") set classObject = $CLASSMETHOD(dtlName ,"%New") write !,"DTL: "_dtlName write !,"Source type: "_classObject.GetSourceType() write !,"Target type: "_classObject.GetTargetType() write ! }
Remember: It works only if the class inherits from Ens.DataTransformDTL , if you know which class is the one that inherits the DTL you want to examine, change the name of the value of 'Super' in the previous query
Best regards,
Francisco Lopez
- Log in to post comments



