Ask the Experts - 89

Posted by Nitin Pai
February 25th, 2009


I have a strange situation in our TEST environment.
In HRMS – Workforce Administration > Job Information > Job Data.
We are terminating some IDs. But, the SAVE is NOT happening. Its page shows the message “Saved”. But the ‘TER’ action row does not get saved in the data base. When I return to search and come back to the page, I do not find the ‘TER’ row either.

One thing I have observed is that it happens for all those who have a User Profile. If I hire a new guy without creating a user profile, i am able to terminate him.
Rama Naidu

Thanks for posting your question!

  • Please check in your system if there is any customization which is creating constrains that does not allow termination of employees having user profiles. PeopleSoft does not have any such rules built in.
  • Also check your SavePreChange PeopleCode to understand any possible customization. Try inactivating the user profiles before termination.
  • Try to replicate the issue in your demo environment. If it works fine in demo then compare the code between demo and your TEST environment to identify any customizations which might be causing this issue.

Dipen Kenia
Nitin Pai

Can I handle the Database Level Delivered Error Messages?
I have to show the user a user-friendly message instead of :
“Duplicate Key Value — not allowed. (15,7)” – – – – – –
(which comes when user adds a new row with same keys in the scroll area;
where user cannot see the old row and the new row at the same time)
Rama Naidu.

Thanks for posting your question!

On the field change of the key field which is entered by the user, fire a query to database and find out if a row exists with the same key. In this case you can give your own user friendly message to the user and this is even before the user clicks save.

For Example:
In the scroll area, if you are adding details of company and company code is the key. Then on the field change of the company code field write the following:

Sqlexec(“SELECT X from company_table where company_code = :1”,&company_code,&vrfyflg);

If &vrfyflg = ‘X” then
Winmessage(“Error, the company Code already exists for this record.);

Additional points:

Please insert validation before saving like in the Record SaveEdit event where you can validate if key is already present in database then you can give your user friendly message.Changing the database level message is not possible.

Sachin Deshmukh
Akash Awadhiya

I am trying to add translate values(using radio buttons) of derived work record field onto a page.The field has 5 translate values. The default value is NO. I would like to use only two translate values of the field on my page. These two fields doesnt contain my default value.When I am trying to save the page it throws me a warning “The following record field occurs more than once on this page(number of times)”.

When i am trying to access this field from PIA i am able to select both the values. Please let me know what am I missing here? I would like to have one of these values used to be defaulted. Please help.

Thanks for posting your question!

Option 1

You can ignore the warning. If the same field from same record is used twice, Peoplesoft gives you a warning. You can set the default value at the record field property level. However PeopleSoft will use this default value during save, if the user does not select any value for this field. If you want the user to see the default value set on the page, then on the page activate write the code to assign this default value. Below is the sample code:

Assuming the record is at level zero:
Local record &lrec = getrecord(;
&lrec.getfield(field.lmn).value = “default value”;

This way the default value will be set and the user can see the same. Also if the user wishes to change it, he can change it to another value.

Option 2

On the page please do the following

  • Set a group box around these fields
  • Navigate to “Order” tab in Application Designer for that page and make sure the two radio buttons are right below the group box.
  • In page activate or rowinit of the field write the page specific code assigning it a value
  • If record is already saved then based on the database value assign value to radio button or
  • If it is new then of the two radio buttons whichever you want to make it default. Make sure that when you save you assign the value to the physical record in the backend.

This should resolve the issue.

Sachin Deshmukh
Gautam Subhedar


I am looking to find a tracing tool that will show me inserts into tables when executing application packages. I have tried many different ways to setup the Peoplesoft delivered traces but don’t seem to get the insert statements I am looking for. I am working on version 9 of PeopleSoft and trying to trace the Expenses workflow process. I know tables that this code inserts into but do not see these table insert references in the trace.

Any help would be greatly appreciated

Thanks for posting your question!

Application package does not appear in the traces. You can use the write file function to trace any values in the package code.


  • Open a file in people code in the package and then write the trace values that you require.
  • Enable database level trace. If you are using Oracle database then you can identify the session and enable SQL trace for that session.
  • Consider creating a trigger on the record where you are expecting values to be inserted.

Senthil Theagarajan
Nitin Pai


I created a user profile and gave him access to Administer workforce module. If i log in via this user id, I am not able to access some fields. For Eg, Community Background in Regional Tab under Add a person in Personal Information. But if am trying to login by a user id which is a clone of PS, i am able to view these fields. I believe this is nothing to do with the peoplecode but with security. Please could you advise me on this.Thanks in Advance.

Asha Rao

Thanks for posting your question!

Check the following:
Setup HRMS – Foundation Tables – Organization – Org Defaults by Permission List

Compare the values between the clone PS primary permission list and the user’s (which is unable to view these fields) primary permission list.

Senthil Theagarajan
Nitin Pai

Comments (0)