go to post Ashok Kumar · Aug 11, 2023 Hi Pierre Can you try with below. And try Create a subclass of %CSP.SessionEvents and try override OnStartRequest, OnEndRequest . ClassMethod Page(skipheader As %Boolean = 1) As %Status [ ProcedureBlock = 0 ] { set ^Pierre("login")="on login (by overrided method Page)" return ##super(skipheader) }
go to post Ashok Kumar · Aug 11, 2023 Thanks Vitaliy for the suggestion, %ScrollableResultSet is works for the Cache SQL. We are actually fetching multiple Resultsets and not working as expected for language=tsql. ClassMethod tt() [ Language = tsql, SqlName = mycls, SqlProc ] { SELECT Name FROM sample_SQL.NewClass4 SELECT Name, Age FROM sample_SQL.NewClass5 } set results=##class(%ScrollableResultSet).%New() set tsc = results.Prepare("call sample_SQL.MYCLS()") if $$$ISERR(tsc) W $SYSTEM.OBJ.DisplayError(tsc) do results.Execute() ERROR #6048: Invalid Statement Type: 'CALL'1
go to post Ashok Kumar · Aug 11, 2023 Hello Pierre, You can Override the method OnPreDispatch from the %CSP.REST in your dispatcher class and capture your user connect information in application log. ClassMethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) As %Status { set ^Pierre(pUrl)="" /// your implementation return $$$OK }
go to post Ashok Kumar · Aug 10, 2023 If you're receiving unexpected fields(key value pairs) as part of the JSON and the properties are not included in the class definition. You need to add the below parameter in your class definition(%JSON.Adaptor extended class). This will ignore loading the unexpected field. Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1 In addition, The JSON key-value pair data type should match with class definition property datatype.
go to post Ashok Kumar · Aug 10, 2023 Hello Scott, As of m understanding, If your dynObject is actually the expected JSON format. Create a instance for class response class and load the dynObject into object by method obj.%JSONImport(dynObject)