I think you stand a better chance of getting responses to this if you move it to the HealthShare group and tag it with a HealthShare-related tag. The "Developer Community" tag and the "Developer Community Feedback" group are intended for posts/questions about the DC forum itself, not the InterSystems products. Posts tagged/classified like that don't appear on people's general new feed, AFAIK.

An interesting article, but I'm puzzled by your use of the term "I11n". I'm familiar with "I18n" as an abbreviation for Internationalization (because there are 18 letters between the "I" and the "n". Likewise, I understand "L10n" as standing for Localization. Some Googling suggests that "I11n" is short for Introspection. Or have I missed something?

Does your where clause need a colon in front of pVariable ?

where COLUMNC = :pVariable

If that doesn't fix it, I suggest you first check whether the problem is caused by the &sql(...) or by the way your web page is calling your server-side method.

Remove all your code between the opening &sql( and the closing ) - incidentally, I assume you have a closing ) even though it didn't show in your post.

Make your method end with QUIT pVariable instead of returning tempVariable1.

Do you still get a Javascript error?

For a class definition you can get the timestamp of last change from the TimeChanged property of the %Dictionary.ClassDefinition instance for the class.

For a routine, the TimeStamp property of its %Library.Routine instance is what you want.

But AFAIK the associated username isn't recorded automatically. You could use the server-side source control class interface to record this kind of thing, but it relies on whatever is making the change actually collaborating with that interface.

Do you use any form of source control?