Creating a User using the USER_PROFILE CI

This article shows how to use the PeopleSoft component interface tester tool to:

  • Create a new user
  • Update an existing user's email address

Using the delivered USER_PROFILE component interface.

If you are new to component interfaces, this article should give you a better insight into how they work.

Creating a new User

Open the USER_PROFILE component interface in application designer. Click on the right hand side panel — this is the component interface (the left hand side one is the component) and select Tools > Test Component Interface from the main menu or right click and select Test Component Interface from the pop-up menu.

Another window appears, normally with the label (Untitled) Component Interface Tester.

You want to create a new User ID, so enter the user ID value DILBERT and press the Create New button.


You've specified the user ID, let's specify some of the other fields you would need to enter into the component normally if you were going through PeopleTools > Security > User Profiles > User Profiles such as:

  • Description
  • Symbolic ID (you may need to find this out by opening an existing user)

Note that you can't enter the password fields normally. This is because the component interface has its own methods for setting SetPassword and resetting the user's password ResetPassword. This is covered later.

After entering description and symbolic ID, right click on the top level USER_PROFILE node and press Save.


You will get a pop dialog that reads: Save() results. Return value: 0. A zero means no success. Also notice the error you get in the Error Message Log at the bottom of the component interface tester.

001: Invoke - [Save]. (Errors Pending)(Warnings Pending)
   At least one ID type required (48,50)
   Error saving Component Interface. {USER_PROFILE} (91,37)

Oops, we missed something - we didn't specify an ID type. Note this is exactly the same error you would get if you had tried the steps above in the actual user profile component.

To fix this, find the IDTypes collection, and expand it. We need to enter an IDType, like you would in the ID tab of the user profile component. For example, it might be None or Employee. If you switch back to your component interface in application designer, you'll see that the IDTypes collection is associated with the PSOPRALIAS record.

Some further digging and you should find that the field we are after is OPRALIASTYPE and the possible options are stored in the look up table PSOPRALIASTYPE. Let's use EMP short for employee as our IDType. Enter that into the tester, and you should find it auto populates the attributes — its doing a lookup.

Try using an invalid value such as ZZZ. Because we are in interactive mode (this is option you can set when you start the tester), it will automatically perform edits. You should receive an error like this:

002: SetProperty - [IDType]. (Errors Pending)(Warnings Pending)
  Invalid value -- press the prompt button or hyperlink for a list of valid values (15,11)
  Error changing value. {USER_PROFILE.IDTypes(1).IDType} (91,34)

Just like if you had entered ZZZ into the employee type field in the ID tab of the component.

Because I don't have an EMPLID for my example, I'm going to change the IDType to NON for none. This will clear out any attributes. After you do this, go back to the top USER_PROFILE node and try to save the component interface again.

Hopefully, all goes well and you get the following message: Save() results. Return value: 1. A return value of 1 means success, and as you've seen previously a return of 0 is a no success.

So now we have a user, DILBERT in the system and if you navigate to PeopleTools > Security > User Profiles > User Profiles you should be able to find him. However, we haven't set his password yet!

So back to the tester, right click on the top USER_PROFILE node and click on SetPassword. Enter the password you want to use, and press OK (maybe more than once!).


Now you need to save the component again, so right click on USER_PROFILE and press Save. Hopefully you get a return value of 1 again indicating the save was successful. Your user now has a password too. For the observant, you'll see that the encrypted flag has been changed from 0 to 1, indicating the password has been stored as an encrypted value in the database.

Updating an existing user

Close down the component interface tester, and reopen it for the USER_PROFILE component. Enter DILBERT in the Get keys section and press the Get Existing button.


Scroll down and expand the EmailAddresses collection. We're specifying a new email address with email type BUS which is short for business, an email address and making this the primary email (set the flag from N to Y):


Go back up to the USER_PROFILE top node, and right click and press Save. Hopefully you get a result of 1, and your user now has an email address. If you have problems, check your error message log, it will tell you exactly what went wrong.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License