Populate Short Description Field On Incident Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 03:29 AM
Hi Guys,
I want to populate some text filled in Short Description Field on Incident Form for a particular user.Let me know how to achieve this through client script
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 03:55 AM
I have one doubt will it be OnLoad() or OnChange() ? Please clarify this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 03:57 AM
Hi Gourav,
If you want in onchange of User go ahead with Onchange otherwise if you want it to run when the user opens the form use On Load.
It depends on your requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 04:15 AM
Hi,
I have tried it in OnLoad() but its not working.And in OnChange() also its not working,
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var userID = g_user.userID.;
if(userID == "f9826bf03710200044e0bfc8bcbe5d2e")
{
g_form.setValue("short_description","test");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 04:19 AM
Hi Gourav,
The code provided was for the login in person.
Do you want it to be based on caller ?
if (isLoading || newValue === '') {
return;
}
if(newValue== "f9826bf03710200044e0bfc8bcbe5d2e")
{
g_form.setValue("short_description","test");
}
On load for caller.
var userID = g_form.getValue("caller");
if(userID == "f9826bf03710200044e0bfc8bcbe5d2e"){
g_form.setValue("short_description","test");
}
Hope this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 05:11 AM
Hi Sneha,
Thanks for your help.I really appreciate.I have one more doubt on this if I want to set this condition for multiple users or users with specific roles then how I will achieve this requirement?
Also where can i write Glide record script for table level?