SQL to lock all objects in a Project

How to lock all the objects in a project, very useful when migrating mega projects.

INSERT INTO SYSADM.PSCHGCTLLOCK
SELECT
'yourID'
, A.OBJECTTYPE
, A.OBJECTID1
, A.OBJECTVALUE1
, A.OBJECTID2
, A.OBJECTVALUE2
, A.OBJECTID3
, A.OBJECTVALUE3
, A.OBJECTID4
, A.OBJECTVALUE4
, SYSDATE
, A.PROJECTNAME
, ' '
, ' '
FROM SYSADM.PSPROJECTITEM A
WHERE PROJECTNAME = 'projectName'
AND NOT EXISTS
(SELECT 'X'
FROM SYSADM.PSCHGCTLLOCK B
WHERE B.OBJECTTYPE = A.OBJECTTYPE
AND B.OBJECTID1 = A.OBJECTID1
AND B.OBJECTVALUE1 = A.OBJECTVALUE1
AND B.OBJECTID2 = A.OBJECTID2
AND B.OBJECTVALUE2 = A.OBJECTVALUE2)
AND OBJECTTYPE <> 30 -- (SQL for views)

Finding a Component in the Portal Registry

define Component_Name = 'GU_EX_SCH_DOWNLOAD';

select distinct LEVEL, PORTAL_LABEL
from PSPRSMDEFN
where PORTAL_LABEL <> 'Root'
connect by PORTAL_OBJNAME = prior PORTAL_PRNTOBJNAME
start with PORTAL_URI_SEG2 = &Component_Name
order by LEVEL desc;

undefine Component_Name;

Fun with the DoModalComponent function.

The example given in PeopleBooks is misleading. Read the description carefully -

The first three parameters are straighforward, and can be drag-dropped from the menu definition in your project (shortcut hint there).

The fourth parameter is a little different:

component_item_name

The component item name of the page to be displayed on top of the modal component when it displays. The component item name is specified in the component definition.


Note "The component item name is specified in the component definition"? Open up the component and find the page you want to navigate to.

For this parameter use the page's "Item Name", not the "Page Name".

It's always a bit nasty when the example is misleading and the explanation slightly obscured, I mean who reads the doco really, really carefully? ; )