- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 02:02 PM
We have implemented Password Reset. Part of the process is to ensure users have entered a secondary email address (custom field) in their profiles. I'm looking to create an email notification that will be sent when:
Password Reset Enrollment Snapshot Status is "Active"
Secondary email is not empty
I initially pointed the notification to the pwd_enrollment_snapshot table and had it run on Update. However, I realized that won't work given that the user's are updating their profiles on the sys_user table.
This "Enrollment Complete" notification should check the user's enrollment status when they add a secondary email address in their profile. How do I do this?
Thanks in advance!
Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 11:39 AM
This helps. While I was testing this, it helped me come up with a different solution by simply placing an Info message under the Secondary email field only if it is empty.
With an onLoad Client Script on the sys_user table:
function onLoad() {
//Type appropriate comment here, and begin script below
var se = g_form.getValue('u_email');
if (se == ''){
g_form.showFieldMsg('u_email', 'ADD YOUR MESSAGE HERE', 'info'); //display info message if secondary email field is empty
} else {
g_form.hideFieldMsg('u_email', 'ADD YOUR MESSAGE HERE', 'info'); //hide info message if secondary email is specified
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2016 09:49 AM
ah, much simpler then.
function checkEnrollment() {
var user = g_form.getUniqueValue();
var enrol = new GlideRecord('u_pwd_enrollment_snapshot');
enrol.addQuery('u_user', user); //u_user is the user field on the enrollment table
enrol.addQuery('u_enrollment_status', 'true'); //enrollment status is active
enrol.query();
while(enrol.next()) {
alert('success.');
}
}
In this configuration, enrollment status is a true/false field, but you can change it to suit your needs,,,
Harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 11:39 AM
This helps. While I was testing this, it helped me come up with a different solution by simply placing an Info message under the Secondary email field only if it is empty.
With an onLoad Client Script on the sys_user table:
function onLoad() {
//Type appropriate comment here, and begin script below
var se = g_form.getValue('u_email');
if (se == ''){
g_form.showFieldMsg('u_email', 'ADD YOUR MESSAGE HERE', 'info'); //display info message if secondary email field is empty
} else {
g_form.hideFieldMsg('u_email', 'ADD YOUR MESSAGE HERE', 'info'); //hide info message if secondary email is specified
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 01:55 PM
Very good. If you can share your code for other people to use - that'd be great.
Also, mark your answer has correct, so that other people can find and use it.