Comments on: Adding Referenced Records Without Leaving the Form https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 20:33:14 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Ashwin https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8450 Tue, 31 Oct 2017 14:49:36 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8450 Hi Mark,

I am calling the ‘GlideDialogForm’ from a catalog catalog client script.

I am now trying to close this ‘GlideDialogForm’ window from the UI Action of the target table ( which GlideDialogForm is referring to). But , I had no success to close it off. There were couple of option I used which did close the GlideDialogForm but it also refreshes the original catalog form as well ( The form over which ‘GlideDialogForm’ is running).

Thanks,

Ash

]]>
By: Sam https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8449 Thu, 13 Jul 2017 02:41:43 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8449 Hi Mark, I am getting multiple scroll bars on the GlideWindow when implementing this solution.

]]>
By: Olivia https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8448 Thu, 22 Jun 2017 20:25:26 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8448 You saved a life today with this lol. Thank you, your siteis amazing.

Just implemented this in our system today with a few tweak for different reference fields.

]]>
By: Mark Stanger https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8447 Thu, 30 Jun 2016 16:27:36 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8447 In reply to Ashvin.

Not as far as I’m aware.

]]>
By: Ashvin https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8446 Fri, 24 Jun 2016 14:08:38 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8446 Is it possible to have list edit functionality in the GlideDialogForm, if opening list view of particular table in the popup?

Thanks.

]]>
By: bryan https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8445 Thu, 14 Apr 2016 21:57:55 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8445 Five years later and still a very slick solution for a variety of use cases. I just added this to a custom reference field that feeds into a table where we track employee appointments (that do not get registered in the official employee directory).

Thanks Mark.

]]>
By: Mark Stanger https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8444 Wed, 02 Mar 2016 13:04:06 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8444 In reply to Harel Ben-Sheffer.

Not a way that I know of. Maybe some custom UI action to save asynchronously, but the standard form buttons will take over the whole page.

]]>
By: Harel Ben-Sheffer https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8443 Wed, 02 Mar 2016 12:37:14 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8443 Thanks for the excellent post – 5 years after it was published, it is still relevant :)
A quick question: is there a way to stay in the form after clicking “Save”? Currently, “Save” and “Save and Exist” do the same; I would like the user to be able to stay after saving, instead of clicking again on the macro button.

]]>
By: Rnorton https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8442 Thu, 24 Sep 2015 18:36:34 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8442 In reply to Rnorton.

[code]
function setUserField(action, sys_id, table, displayValue){
if (action != ‘sysverb_insert’){
//Set the user field with the popup user
g_form.setValue(referenceField, sys_id);
} else {
var ggsys = new GlideRecord(‘u_gct_caller_information’);
ggsys.addQuery(‘sys_created_by’, g_user.userName);
ggsys.orderByDesc(‘sys_created_on’);
ggsys.setLimit(1);
ggsys.query();
if (ggsys.next()){
sys_id = ggsys.sys_id;
g_form.setValue(referenceField, sys_id);
}
}
}
[/code]

]]>
By: Rnorton https://servicenowguru.com/ui-macros/adding-referenced-records-leaving-form/#comment-8441 Thu, 24 Sep 2015 18:26:37 +0000 https://servicenowguru.wpengine.com/?p=3508#comment-8441 In reply to Mark Stanger.

Thank you for the reply,

I ended up doing a query for the last user created by the logged in user with a limit of 1. Then updating the sysid variable inside that function.

]]>