getReference without callback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2024 12:22 AM
Auto populate of user details with out callback by using incident table?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2024 10:08 AM
@SANNAPUREDDYV You can use getReference without callback in client script on the native view. getReference without callback doesn't work on the Service Portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2024 10:34 AM
What exactly are you trying to do here? Very little details in your question.
From what I can understand, you want to auto-populate some user details on the Incident form. And as @Sandeep Rajput points out about the Portal not supporting getReference without a callback, which UIs are you looking to have this work in?
So the real question is: why without a callback? You can always add dot-walked fields onto the form: no callbacks, not even any code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2024 10:58 AM
Hi @SANNAPUREDDYV,
Adding to the great points from @Jim Coyne and @Sandeep Rajput, please note that despite getReference() being available client-side (with or without a callback), it's not best practice.
In short, it's a potential performance overhead as typically during the script and call back only a single value is required, The getReference() will return an entire GlideRecord object.
Best practice here would be to use GlideAjax - See the below link for examples on how to use it.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

Thanks, Robbie