Hi,
i've written peoplecode on fieldchange event where there's a field amount which should not exceed $1000.
Peoplecode
If All(LOAN_TRK.AMT) Then
If LOAN_TRK.AMT.Value > 1000 Then
Error ("Loan amount cannot exceed $1000");
End-If;
End-If;
the error message is shhoting but on save the page is storing the amount in excess of 1000.
Do i need to use DoCancel() exactly after the Error message so the the page sould not get saved with amount more then $1000 ?
| Title | Under | Posted on |
|---|---|---|
| how to create application status in peoplesoft campus solutions 8.9 version | PeopleSoft Functional | 05/17/2012 - 4:09am |
| horizantal text in charts | PeopleSoft Technical | 05/10/2012 - 4:57am |
| no current buffer context error | PeopleSoft Technical | 05/10/2012 - 1:19am |
| Integration Broker : Operating Instance/Pub Contracts/Sub Contracts | PeopleSoft Technical | 04/24/2012 - 11:05am |
Put you code in FieldEdit instead of FieldChange.
Thanks
Nitin Bhatia
Nitin is correct.
Use the Error function in FieldEdit or SaveEdit PeopleCode to stop processing and display an error message.
• In FieldEdit, Error stops processing, displays a message, and highlights the relevant field.
• In SaveEdit, Error stops all save processing and displays a message, but does not highlight any field.
It is clearly stated in PeopleBooks not to use the Error function in a FieldChange event.
I would also strongly recommend storing your message error into a message catalog instead of hard coding it. Look at the MsgGet function in PeopleCode to see how you can retrieve your message and define the “Severity” level as well. Or take a look at the following post for a quick example http://www.compshack.com/peoplesoft/difference-between-msgget-messagebox...
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Post new comment