why we use/where we use ----''getGlideObject()''...............

Kishore8
Kilo Guru

plse explain

5 REPLIES 5

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Here's a good place to start:



ServiceNow Developers


Blaze2
Kilo Guru

I had the same question a couple of years back and these were a few of the sources that helped me out in understanding it. mainly because of the examples given.



Using GlideRecord to Query Tables - ServiceNow Wiki



GlideRecord Query Cheat Sheet - ServiceNow Guru  


Community Alums
Not applicable

To get the the object from the date time field.

 

It's a easy way to convert the value in a date/time field to GlideDateTime Object, is by using getGlideObject() method of the Glide Element Class.

For Eg : 

var gdt = current.start_time.getGlideObject()

Hi Kush,

 

The getGlideObject() method is used for instantiating any object and not only for date/time field. For example, it can be used for fetching the questions and answers for the variables . Refer https://community.servicenow.com/community?id=community_question&sys_id=b7654faddbd8dbc01dcaf3231f961955

 

Regards,

Swathi