Enter Email address option on glide_list type field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 05:10 AM
Hi All,
We have glide_list field type that references sys_user table.
If I try to enter any email address on "Enter email address" Option from the form itself it gets updated with the email that does not exist on sys_user table.
var comp = $sp.getParameter('comp');
var graddnonpIsr = new GlideRecord('core_company');
graddnonpIsr.addQuery('sys_id',comp);
graddnonpIsr.query();
if(graddnonpIsr.next())
{
graddnonpIsr.u_sup_cont = input.nonpcontacts.u_support_cont;
graddnonpIsr.update();
flag = true;
}
However I am trying to update the same field via server side script with code (above) what happens is it checks if email exist on sys_user table and updates that user on the field which we do not want to happen. I do not want it to look up to user records instead just update the email address entered by user and update the field. How do I do the same?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 05:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 05:17 AM
I do not want it to check the email id if it exist on the system. I just want the field to update the email address entered by the user.
Current behaviour of the form is if you enter any email address, if it exist on system or if it does not it just updates the email address to the field which I think happens via "Enter email address" option I need the same to happen from backend. How do I do it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 05:40 AM
Hello @DB1
If you do not want to look user table while updating. It will update whole record.
On what condition/query you need to update email if the email doesn't exists get confirmed from your requirement.
Or you can add query as email!=empty and run script to update
Please mark helpful if I have answered you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 05:24 AM
For example,
I entered test@fake.com on "select a target record" which pulled the existing record however I entered the same email id on "enter email address" which took the input test@fake.com and the form just updated the field
But, I try to update the field via server script as
graddnonpIsr.u_sup_cont = input.nonpcontacts.u_support_cont;
It looks the user record but I do not want that to happen. Please help