Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to create new user via catalog item and workflow?

patrycjabak
Tera Contributor

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?
servicerequestcatalog.png

workflow2.png

3 REPLIES 3

Gowrisankar Sat
Tera Guru

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();


But how to make it live ?
Is there any way to make button create ?
its new for me


Use the above script in Run script.



Best Practice:   Use rec.newRecord() instead rec.initialize(); in the above code.