- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015 12:23 PM
Hello,
We are on Eureka patch 12.
I am creating an Onboarding application. I extended the sys_user table and called the new extended table Onboarding. Here is how this was intended to work:
- Email sent to ServiceNow from Taleo with job requisition number and minimal information - this creates a ONB record (Onboarding table) and sends the hiring manager an email to order equipment.
- Manager orders equipment and references ONB record number.
- IT Asset Management begins ordering/configuring.
- New person is hired to fill the position.
- Email sent to ServiceNow to create a new user on the sys_user table (this works fine - been using for a while now).
- There is a business rule on the sys_user table that copies the user name and user ID to the Onboarding record. (Here's where things get weird)
When to run: Before
Order:101
var onb = new GlideRecord('u_onboarding');
var reqno = current.u_onb_req_no;
onb.addQuery('u_requisition_number',reqno);
onb.query();
while(onb.next()){
onb.user_name = current.user_name;
onb.name = current.name;
onb.update();
}
7. Now when I look at the newly created sys_user record, the Onboarding form displays instead of the sys_user form!
Should I have just created the Onboarding table as a new table instead of an extended table? Why is this happening?
Thanks,
Laurie
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015 02:54 PM
Hi Laurie
I think you should create your Onboarding Request as a standalone table instead of extending the user table. You should create a record in sys_user table once your onboarding process completes.
Having this onboarding request table as child of user table will lead to confusion to users as they will see these onboarding table records as well in the reference/list fields that are referring to user table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015 12:36 PM
Uh-oh....Tables and classes. Not sure I understand how to do what I'm trying to accomplish.
http://wiki.servicenow.com/index.php?title=Tables_and_Classes#gsc.tab=0
Not sure how to get the updates on the sys_user record to appear on the onboarding record. Both records have the Job Requisition number on them. Should this be a reference field or something like that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015 01:26 PM
Laurie,
Try to change the business rule to onAfter and see if the issue is fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2015 06:16 AM
No luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015 02:54 PM
Hi Laurie
I think you should create your Onboarding Request as a standalone table instead of extending the user table. You should create a record in sys_user table once your onboarding process completes.
Having this onboarding request table as child of user table will lead to confusion to users as they will see these onboarding table records as well in the reference/list fields that are referring to user table.