Lorenzo Scalese · May 18, 2019 go to post

Hello Eduard,

For debug purpose , you can try this :

Set obj = {Your test.ABC instance}

Set res = ##class(%Studio.General).DumpObjectFunc(obj)

While res.%Next() { Write !,"Property : ",res.%Get("Name"), !," Value : ",res.%Get("Value") }

Or just perform a zw obj

Regards.

Lorenzo.

EDIT : I tested with ##class(%Studio.General).DumpObjectFunc(obj)

We can get value if "myProp" is not an object.

Lorenzo Scalese · Mar 22, 2019 go to post

Hello,

We are using this procedure in order to reduce the dowtime during software update. 

In short :

  • Create a temp namespace. 
  • import and compile code.
  • stopping application.
  • switch DB code on target namespace.
  • Execute a script for data update (if needed).
  • starting application.

It work fine for Caché.

Coming soon, we will do that for production with HealthShare Health connect.

It should be work fine also for a production, but  I don't done a test yet.

If you have a translate file, don't forget import your traductions because ^CacheMsg and ^CacheMsgNames are in CODE database.

Regards.

Lorenzo Scalese · Mar 9, 2019 go to post

Hello,

I think, you should simply append your own error message like that : 

Set obj = ##class(User.tApplications).%OpenId(YourTApplicationId,"4",.errors)
Set:$$$ISERR(errors) errors = $$$ADDSC(errors,$$$ERROR($$$GeneralError,$$$FormatText("%OpenId failed for User.tApplications with id %1",YourTApplicationId)))

If an error occurs, variable "errors" will contain 2 errors.

NS>d $System.Status.DecomposeStatus(error,.b)
 
NS>zw b

Your error is in the subscript b(2).

Add #include %occStatus if you are in a routine (for macro usage).

Regards.