- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 12:08 PM
Is it possible to see a populated value in a Document ID field on the UI that is set via script / g_form? This answer is very close to what I am trying to do, but needs to update the UI.
I have a custom sys_id param set in the URL that populates a document ID field.
Setting the field on which the Document ID depends works as expected:
g_form.setValue("parent_table", "example_parent_table_name");
Setting the Document ID will populate the form correctly on submit, but clears out the view in the form.
g_form.setValue("parent_sys_id", "example_sys_id_123");
results in
You can see this same behavior by setting the document id manually (2nd example) from the javascript console.
Ideally I would like to demonstrate to the user that there is some sort of data that has been associated, whether the original that is populated correctly on-load, or the result of setting the g_form value via a script. Is there a method or recommendation for accomplishing this?
Thanks.
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 11:32 AM
So it turns out that the Document ID's dependent field had the data type of "Table Name" instead of "String", which caused the UI not to update.
The solution is to use "String" as a the data type instead of "Table Name".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 02:57 PM
What is the original need ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:01 PM
I have a custom param in the URL that needs to populate a Document ID field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:30 PM
As a workaround :
Have you tried to update it in the server side.
something like
gr.parent_table = "the parent table name"
gr.parent_sys_id = 'the sys_if of the parent record"
gr.update();
If it works, then try to set up a GLideAjax in your client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 11:32 AM
So it turns out that the Document ID's dependent field had the data type of "Table Name" instead of "String", which caused the UI not to update.
The solution is to use "String" as a the data type instead of "Table Name".