- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:13 AM - edited 09-28-2023 12:16 AM
Let's say that I want to add some footer when user edits Compose -> Comments
g_form.setValue('comments', g_form.getValue('comments') + ' ' + yourFooter);
and it's working (thou it's just silly example, cause I know, it has a bug if we call it like that onChange(), ignore it) in the incident edit view. But it's not working in the workspace 'compose' tab.
Thou I see in logs, everything is fine. Just g_form.setValue does not make any effect on the input.
If I change comments to description - it's gonna work as desired on both views, but it's not working on Compose.
How to edit this field via script when user edits it?
Ah I was on Utah, but upgraded to Vancouver - still same problem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:54 AM
Hi @SzymonW ,
This is expected behavior, please check the following KB from ServiceNow for a work around on Journal Fields.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1117349
Please mark my answer helpful and accept as solution if it helped you 👍✔️
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:54 AM
Hi @SzymonW ,
This is expected behavior, please check the following KB from ServiceNow for a work around on Journal Fields.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1117349
Please mark my answer helpful and accept as solution if it helped you 👍✔️
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:20 AM
thanks for quick reply!
So, this is required to set by the user. If my app would be published on Store, I would need to add additional instructions how to achieve that, is that right?
Do you know if I can automate it somehow as app developer for users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:26 AM
@SzymonW You can instruct them but the customer might not want be interested in doing that.
Have you tried using Business Rules, instead of client script?
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 03:26 AM
@AnveshKumar M Business Rules are on server-side right? It's essential for me to edit this, live, when user is typing text, so they see what the application is changing.
Anyway, thanks!