Pop up error message if duplica or other error

I have some insert action, I would like to have errormesage pop up if replicate or other error , pop up an error message
Local record &REC;
&REC = CreateRecord(RECORD.MYRECORD);
&REC.KEYF1.Value = "A";
&REC.KEYF2.Value = "B";
&REC.MYRF3.Value = "X";
&REC.MYRF4.Value = "Y";
&REC.Insert();

0,0 stands for the message catalog set and number.
If you want to do it the correct PeopleSoft way, you need to define you message texts as message catalog entry and then use this like
MessageBox(%MsgStyle_OK, "An error occurs in SaveChecklist", 20001, 1, "Default message if message catlog entry is not found");
Custom message catalog entries need be entered on a message set greater then 20000. Message catalog set up to 20000 are reserved by PeopleSoft.
With messagebox you will only popup a message, but processing continues.
If you do not want the component to save, use Error instead, this stop processing and saving the transaction.
Error MsgGet(20001, 1, "Default message if messagecatlog entry is not found");
New message catalog entries can be entered via menu PeopleTools, Utilities, Administration, Message Catalog.
See PeopleBooks for further information
PeopleBooks > PeopleTools 8.52: System and Server Administration > Using PeopleTools Utilities > Message Catalog

Similar Messages

Maybe you are looking for

  • Error when using sort variant 0005 for RABEWG01 (tcode za353)

    Hi SAP experts, I have a problem with program RABEWG01 (tcode za353). When I use sort variant 0005 and execute it, I get this error: Table ANLV is not supported in the requested report Message no. AB066 Diagnosis You requested sort version 0005 for t

  • Report not output ENGLISH character

    hi, im using 12.1.3, recently just did a customization report. but the report not output in English character, instead it outputs in Greek or Symbol font in PDF. i can see the ENGLISH output if i run it in REPORT BUILDER. my app server is RED HAT 5.

  • MG 7120 won't print e-mails. Leaves blue strip across top of page.

    Spoke to a Mac advisor last night for setup and thought everything was ok.  Won't copy emails and there is no large box that comes up to show what you are printing or how many copies you want.

  • Forms quits when this pl/sql code is ran.....please help!

    PROCEDURE procJob IS CURSOR c1(staff_in NUMBER) IS SELECT staffid FROM jobHist WHERE staffid = staff_in FOR UPDATE OF todate; c1_rec jobHist.staffid%TYPE; n number; i number; BEGIN OPEN c1(:STAFF.STAFFID); loop fetch c1 into c1_rec; exit when c1%notf

  • Decrease distance scrolled per mouse wheel notch (Desktop)

    As of yesterday's 1.0.1.1060.gc75ebdfd update, one scroll wheel notch scrolls much longer than it used to do. Before it scrolled the distance it was supposed to, as defined by the vertical Scrolling setting in Control Panel->Mouse. In the update, it