Siebel HelpDesk Guide > Setting Up Employee Self-Service > Designing Employee Self-Service Requestor Forms >

Preventing Duplicate Record Creation

When the form is submitted, field values mapped to a business component field are automatically written to the actual fields by SmartScript. To prevent the Siebel application from writing to the business component field and creating duplicate records, include the Cancel() function within the script_finish program.

To prevent duplicate record creation

  1. Navigate to the Site Map > Administration - SmartScript > Scripts view.
  2. In the Scripts list, select the script, and then click the Programs view tab.
  3. In the Programs list, select Script_Finish.
  4. In the Program Language field, select eScript, and then click Save.
  5. In the eScript field, include the Cancel() function.

    For example, the following statement runs the entire SmartScript, but no updates are saved to the database, even after the user chooses Submit.

    function Script_Finish ()


    // Cancel saving everything to the database

    Cancel ();


  6. To make sure that data entries are always saved, whether the form is complete or incomplete, select Always in the Save Session field.

    When the form is complete, choose Finished to save data entries.

    NOTE:  Selecting Finished or Always from the Save Session field forces your Siebel application to write the values to the SmartScript session tables.

  7. Click Check Syntax to locate syntax issues, and save the record.
Siebel HelpDesk Guide Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices.