How to create new user via catalog item and workflow?
This content was last updated in 2018. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2018 01:39 AM
As above, i want automate adding users. How to do it ?
I have created variables in catalog item and i added workflow with script
how can i put button "create" or somenting similiar?
- Labels:
-
Best Practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2018 01:46 AM
Insert
var rec = new GlideRecord('user');
rec.initialize();
rec.first_name = current.variables.<firstname_Variable>;
rec.last_name = current.variables.<lastname_Variable>;
rec.company = current.variables.<company_Variablename>;
rec.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2018 02:13 AM
But how to make it live ?
Is there any way to make button create ?
its new for me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2018 03:09 AM
Use the above script in Run script.
Best Practice: Use rec.newRecord() instead rec.initialize(); in the above code.