- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 02:58 AM
Hi everyone,
I'm Junior Developer and I'm stuck with this story and I need some help:
As a process user
I want a field message saying "This user is VIP" when the caller in the incident form is a VIP user
SO THAT I know when I am working with a VIP user
I know this is complete when a field message is shown to process user if the caller is VIP Please use g_form.getReference
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 03:10 AM
Hi,
You can do it like that:
var caller = g_form.getReference('your_user_field', isVipDo);
function isVipDo(user){
if (user.vip==true) ;// Do something
}
Nota: For this kind of uses it's recommanded to use ajax . More details in this article:
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 03:10 AM - edited 04-18-2023 03:10 AM
Write a onchange client script on caller field and mention the script as below:
var data = g_form.getReference("caller",myData); //myData is the callback function, caller is the backend name of field
function myData(data){
if(data.vip == "true"){
g_form.showFieldMsg("field_backend_name", "This User is VIP")
}
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 04:27 AM
Var grUser = g_form.getReference("caller_id",checkVipUser);
Rest looks good 🙂
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 04:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 04:05 AM
Please update the line 13 as:
g_form.showFieldMsg("caller","This is VIP user");
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 04:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 04:27 AM
Var grUser = g_form.getReference("caller_id",checkVipUser);
Rest looks good 🙂
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 06:10 AM
Thank you very much for all the help 😊