Comments on: GlideRecord Query Cheat Sheet https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/ ServiceNow Consulting Scripting Administration Development Tue, 12 Mar 2024 21:11:27 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Suzanne Swanson https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9993 Tue, 01 Sep 2020 22:26:31 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9993 It’s 2020 and I’m still using this resource!!
Thanks!!!

]]>
By: Jing Yin https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9992 Thu, 24 Oct 2019 14:30:48 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9992 Hi Mark, very helpful. Thanks for sharing!

]]>
By: Jawad FIKRI BENBRAHIMd https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9991 Thu, 22 Nov 2018 15:08:24 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9991 Hell guys,

Your document is awesome as it gathers a load of informations about server side queries together.

Best regards
FIKRI BENBRAHIM Mohamed Jawad

]]>
By: Steve McDonald https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9990 Fri, 01 Jun 2018 12:44:01 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9990 In reply to Doug.

I know this was asked a long time ago but here is how you print the current query:
gs.print(gr.getEncodedQuery());

Returned:
numberSTARTSWITHINC^stateIN1,2^sys_updated_on<=2018-06-08 06:59:59

My query is:

var gr = new GlideRecord('task');
gr.addQuery('number', 'STARTSWITH', 'INC');
gr.addQuery('state', 'IN', '1,2');
gr.addQuery('sys_updated_on', '<=', endDate);
gr.query();

]]>
By: Simon https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9989 Thu, 18 Jan 2018 06:42:42 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9989 In reply to Victor Olufowobi.

Hi Victor

This kinda GlideRecords should only be used Client side as the new Service portal doesnt allow sync calls.
On the other hand side – best practice is using GlideAjax for Client -> Server -> Client calls.

]]>
By: Simon https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9988 Thu, 18 Jan 2018 06:38:16 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9988 Hi Mark

Together with setWorkflow(), autoSysFields() and setForceUpdate() theres actually 1 more “hidden” method.
gr.setUseEngines(false); //Do not evaluate data policies

]]>
By: Jithin https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9986 Wed, 01 Nov 2017 04:49:17 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9986 Very Helpful Thanks Mark..

]]>
By: Daniel Oderbolz https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9985 Wed, 04 Oct 2017 09:01:11 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9985 Hi

Thanks for this great resource}
One thing I think this lacks is the

updateWithReferences()

http://wiki.servicenow.com/index.php?title=Inserting/Updating_GlideRecord_with_References

Method or in general, discussion of how to update reference fields (or insert new references).
Could this be added?

]]>
By: Mila Morales https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9984 Wed, 30 Aug 2017 15:57:45 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9984 In reply to SHILPA JAIN.

Hi Shilpa,
Could you show us the script you used so we could take a look at it.

]]>
By: SHILPA JAIN https://servicenowguru.com/scripting/gliderecord-query-cheat-sheet/#comment-9983 Sat, 26 Aug 2017 02:21:46 +0000 https://servicenowguru.wpengine.com/?p=1016#comment-9983 Hi Mark,

I tried your code to insert an incident record, it is inserting some 100 record when creating one record. something happening when it’s calling insert.

]]>