- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 05:24 AM
Hi, I want to display pop-up when form loads when contact field is guest (his userID is guest).
I wrote the script, but it fails. Any ideas why?
function onLoad() {
//Type appropriate comment here, and begin script below
var user = g_user.UserID();
if (user == 'guest'){
alert("Please update Contact field to actual customer reporting the issue before proceeding");
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 05:28 AM
Hi,
I was wondering how you have allowed the guest user to login to the system. What you can do is to fetch the contact field value itself by
g_form.getValue('name of contact field')
var user = g_form.getValue('name of contact field');
if (user == 'guest'){
alert("Please update Contact field to actual customer reporting the issue before proceeding");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 06:41 AM
Nevermind, I changed type to before since running abort on After didn't make any sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 05:42 AM
Once try the below script. Modify the guest with his sysId.
function onLoad(){
var user = g_user.UserID();
if (user == 'sysIdOfGuestUser'){
alert("Please update Contact field to actual customer reporting the issue before proceeding");
}
}