What is the use of getReference()?

ishankaggarwal
Tera Contributor

What is the use of getReference()?

16 REPLIES 16

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Good to know as well is that ServiceNow doesn't recommend using getRefence any longer. Either use a GlideAjax call or using a display Business rule.

 

//G

Why don't they recommend getReference anymore??

 

Hello Brandon,

 

In the above explanations you can find why ServiceNow don't recommend using getReference() method anymore.

And mainly using getReference method without callback function is not recommended at all, but if you have requirements where you have to use getReference(), then use it with callback function.

Hope you find answer to your question using the above explanations.

 

Regards,

Soumya

Performance impact is the reason. This article covers it well: 

 

https://community.servicenow.com/community?id=community_question&sys_id=2d08436ddb1cdbc01dcaf3231f96...

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

Hello @Göran WitchDoctor Lundqvist ,

Can you please show where ServiceNow is saying that getReference() should no longer be used?  I'm thinking based on this API function that it's FINE TO USE, as long as you specify a callback function with it:

https://developer.servicenow.com/dev.do#!/reference/api/rome/client/c_GlideFormAPI#r_GlideForm-GetRe...

Thoughts?