Extended User Table for Onboarding Table - Now User Record Shows Onboarding Form

Laurie Marlowe1
Kilo Sage

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:

  1. 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.
  2. Manager orders equipment and references ONB record number.
  3. IT Asset Management begins ordering/configuring.
  4. New person is hired to fill the position.
  5. Email sent to ServiceNow to create a new user on the sys_user table (this works fine - been using for a while now).
  6. 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

1 ACCEPTED SOLUTION

guhann
Mega Guru

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.


View solution in original post

6 REPLIES 6

Laurie Marlowe1
Kilo Sage

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?


manikorada
ServiceNow Employee
ServiceNow Employee

Laurie,



Try to change the business rule to onAfter and see if the issue is fixed.


No luck.


guhann
Mega Guru

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.