go to post Paul Waterman · Oct 31, 2023 The way I would gather the globals the process looks at would be to slip something into the logon code that traced all the $zr changes to a trace file. Its not exactly what you asked for as it wouldn't be on a different process. s %oldzr="" zbreak /trace:all:"/durable/trace.log" zbreak $:"T":"%oldzr'=$zr":"s %oldzr=$zr w $zr" d ..yourthing() You could try to %Studio.Debugger Attach to the user's process and do a similar thing.
go to post Paul Waterman · Oct 23, 2020 But will it use a name or age index? Age index bad example but hey. Sqlquery is a class so you can extend/replace it. We came up with a syntax where the sql would generate based on the parameters. So you could do SELECT TOP 5 ID, Name, Age, SSN FROM Sample.Person WHERE 1=1 --If Name'="" And Name %STARTSWITH :Name --endif --if Age'="" AND Age >= :Age --endif
go to post Paul Waterman · Mar 14, 2018 There is a directory somewhere in windows that stores temporary files for studio.Could be this has old versions of some classes.I had a similar problem when doing bulk code changes on xml files.Shut down studio. Delete the dir. I can' remember where it is. It's 3am. When I really wake up I will find it.
go to post Paul Waterman · Nov 12, 2017 You should be able to get the trigger to work with object %Save:Trigger OnUpdate [ Event = UPDATE/DELETE, Time = BEFORE ,Foreach = row/object ]
go to post Paul Waterman · Nov 9, 2017 Could you pretend to be the compiler and run the generator method? Might be a problem if the method does anything other than generate code.Class temp.proc{ClassMethod showcode(classname, methodname){ n %class,%code,%method,%compiledclass,%compiledmethod,%parameter s %compiledclass=##class(%Dictionary.CompiledClass).%OpenId(classname) s %compiledmethod=##class(%Dictionary.CompiledMethod).%OpenId(classname_"||"_methodname) s generatorclassname=%compiledmethod.Origin s %class=##class(%Dictionary.ClassDefinition).%OpenId(classname) s %method=##class(%Dictionary.MethodDefinition).%OpenId(generatorclassname_"||"_methodname) s key="" f { s param=%compiledclass.Parameters.GetNext(.key) q:key="" s %parameter(param.Name)=param.Default } s %code=##class(%Stream.MethodGenerator).%New() s exec=" d "_methodname_"^"_generatorclassname_".G1(%class,%code,%method,%compiledclass,%compiledmethod,.%parameter)" x exec d %code.Rewind() w %code.Read()} I am not sure if all the variables here are set correctly, or if the generator code always ends up in a G1 or even if this is a good idea, was just thinking.This is not code I have used before.