Peoplecode 1 Write Query to get the Record PeopleCode Event
###
Peoplecode
1. Write Query to get the Record PeopleCode Events in a give component.
2. Write Query to get the Page PeopleCode Events in a give Component
3. Write Query to get the Component, Component Record and Component Record Field PeopleCode Events
Solution
1. Query to get the Record PeopleCode Events in a give component.
SELECT DISTINCT
B.PNLNAME,
B.RECNAME,
B.FIELDNAME,
C.OBJECTVALUE3,
B.FIELDUSE
FROM PSPNLFIELD B, PSPNLGROUP A, PSPCMPROG C
WHERE A.PNLNAME = B.PNLNAME
AND A.PNLGRPNAME = \'<TYPE COMPONENT NAME HERE>\'
AND B.FIELDUSE NOT IN (8209,21,17,19,8211,9243,22)
AND B.RECNAME <> \' \'
AND B.FIELDNAME <> \' \'
AND C.OBJECTID1 = 1
AND C.OBJECTVALUE1 = B.RECNAME
AND C.OBJECTID2 = 2
AND C.OBJECTVALUE2 = B.FIELDNAME
ORDER BY B.RECNAME,B.FIELDNAME;
