Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

What is purpose of GlideTransaction isVirtual function

hetaldoctor
Kilo Expert

Hi

I have a requirement where is need to do validations for non interactive user accounts

I am achieving this using gs.getSession().isInteractive();

One additional test i need to do is to validate whether the transaction is an external or system generated (e.g. through workflow or some job or auto activity)

I was wondering if i can use 

var trans = GlideTransaction.get();

trans.isVirtual() function

Any thoughts.. welcome

 

Regards

Hetal

1 REPLY 1

asifnoor
Kilo Patron

Hi Hetal,

Unfortunately, there is no API reference available for GlideTransaction. Its a java class which you cannot access it directly.

If you are already using isInteractive() and if it returns true, then it would mean that its a manual update. If it returns false, then it an update from the script or from an external source. 

Mark the comment as a correct answer and helpful if this answers your question.