USING Progress.Json.ObjectModel.*.
USING com.totvs.framework.sec.ProtectedData.
DEFINE VARIABLE jObjRequest AS JsonObject NO-UNDO.
DEFINE VARIABLE jObjResponse AS JsonObject NO-UNDO.
DO ON ERROR UNDO, LEAVE:
jObjRequest = NEW JsonObject().
jObjRequest:ADD("databaseName","emsfnd").
jObjRequest:ADD("tableName","usuar_mestre").
jObjRequest:ADD("fieldName","nom_usuario").
jObjResponse = ProtectedData:isFieldAnonymizable(jObjRequest).
MESSAGE STRING(jObjResponse:GetJsonText())
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
CATCH customError AS fwk.utils.CustomError:
MESSAGE STRING(customError:arryaOfErrors:getJsonText())
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END CATCH.
END.
DO ON ERROR UNDO, LEAVE:
jObjRequest = NEW JsonObject().
jObjRequest:ADD("databaseName","emsfnd").
jObjRequest:ADD("tableName","agenda_rpw3").
jObjRequest:ADD("fieldName","cdn_trans_edi2").
jObjResponse = ProtectedData:isFieldAnonymizable(jObjRequest).
MESSAGE STRING(jObjResponse:GetJsonText())
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
CATCH customError AS fwk.utils.CustomError:
MESSAGE STRING(customError:arryaOfErrors:getJsonText())
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END CATCH.
END. |