Synchronising Delivered & Customised 1-1 tables

UPDATE (years later): I ask myself why not just use another scroll level below the delivered record/scroll containing the sibling record? PeopleSoft will handle the inserts and updates automagically.

Following is likely wrong, but left for reference.

Rather than add custom fields to a PeopleSoft delivered record it is better to create a new record with the same keys that will serve to store new, custom fields. This table and the delivered table will have a 1-1 relationship and there will be less/no work for future upgrades.

To display and synchronise the data on this new table a work record is used on the page. The example below is using Griffith University (GU) records and delivered PS records.

  1. Set default values on this derived record so that there will always be a row in the new table that matches the original table. (Someone will try to join to the new table and have no data at some stage). That is default the key values of the work record to those of the delivered record.

  2. RowInit PeopleCode (GU Work Rec.RI) displays the synchronised data on the Work Record:

    SQLExec("SELECT SOME_FIELD1, SOME_FIELD2 FROM GU_RECORD WHERE KEYFIELD1 = :1", PS_RECORD.KEYFIELD1.Value, GU_WORK_RECORD.SOME_FIELD1.Value);

  3. SavePostChange PeopleCode (Component.PS_RECORD.SPC) then synchronises the tables with a 1-1 relationship (updated 22.10.2007):

    Local Record &recGU_RECORD = CreateRecord(Record.GU_RECORD);

    /* Populate. */
    GetRecord(Record.GU_WORK_RECORD).CopyFieldsTo(&recGU_RECORD);
    GetRecord().CopyFieldsTo(&recGU_RECORD);

    /* Delete if required. */
    If GetRecord().IsDeleted Then
    &recGU_RECORD.Delete();
    Else

    /* Default (specific) values if required. */
    If None(&recGU_RECORD.SOME_FIELD.Value) Then
    &recGU_RECORD.
    GU_RECORD.SetDefault();
    End-If;

    /* Insert/update. */
    &saved = &recGU_RECORD.Save();

    End-If;



Setup and run 3C Communications

Document on how to setup and run the new v9 3C communications. (Written by Kevin Spletter)

http://docs.google.com/Doc?id=df48r26b_3ffkjg4