cancel
Showing results for 
Search instead for 
Did you mean: 

Create User and link it to new Employee

Former Member
0 Kudos

Good Day Everyone,

I have successfully created a VB script that handles the registration of a new User in our SBO Company, but I cannot find the way to link it with a new Employee card. It is my understanding that I need to associate these two objects through the following code:

oEmployee.ApplicationUserID = oUsr.InternalKey

How can I retrieve the newly created userid as the use of a mere

oUsr.InternalKey

returns 0 ?

Is it the correct way to proceed ?

Thank you for your answers,

Jean-Philippe

Edited by: donbuz on May 20, 2009 10:39 PM

Accepted Solutions (1)

Accepted Solutions (1)

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos
oCompany.StartTransaction()
oUsr.Add()
oEmployee.ApplicationUserID =  CInt(oCompany.GetNewObjectKey())
...
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
Former Member
0 Kudos

Thank you - this works smoothly.

Take care, Jean-Philippe

Answers (0)