Wednesday, July 2, 2008

PeopleTools: How-To rename table names on a page via SQL

I have frequently run into the situation when cloning a page where you want to rename a table on a page, but want to keep all field properties the same (ie, custom label, fieldname, etc.). In PeopleTools, when you change the record name on a field, all of the properties get wiped out, so you end up doing a lot of unnecessary cutting and pasting to reset all of the properties. A better way of doing this is to just update the page record directly via SQL:

update pspnlfield set recname = :newrec where pnlname = :pagename and recname = oldrec;

1 comment:

Bryan said...

If you are going to do this you're also going to want to bump up the VERSION on PSRECDEFN by 1 so the App Server and other caching mechanisms know there has been a change.