- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2019 04:13 AM
Hello,
In my PDI i am creating Users through Script but when i am passing a dummy password and trying to login it is not accepting.
Can anyone please help me on this.
var uc = new GlideRecord('sys_user');
uc .initialize();
uc .user_name = user_name;
uc .first_name = first_name;
uc .last_name = last_name;
uc .user_password = 'demo123';
uc.insert();
When i login with the password demo123 it is working
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2019 04:25 AM
Hi irfan,
use
uc.user_password.setDisplayValue("demo123");
ex:
var gr = new GlideRecord("sys_user");
gr.get(some_sys_id);
gr.user_password.setDisplayValue("test");//useing glide Element
gr.update();
NOTE: Mark correct or helpful if it helps you.
Warm Regards,
Raj patel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2019 04:25 AM
Hi irfan,
use
uc.user_password.setDisplayValue("demo123");
ex:
var gr = new GlideRecord("sys_user");
gr.get(some_sys_id);
gr.user_password.setDisplayValue("test");//useing glide Element
gr.update();
NOTE: Mark correct or helpful if it helps you.
Warm Regards,
Raj patel