NewRecord Method

The NewRecord method initializes a new record that Siebel Open UI adds to the database that resides on the Siebel Server. It uses the following syntax:

BusComp.prototype.NewRecord = function (bInsertBefore, bInternal, pIdValue) {} 

where:

  • bInsertBefore can contain one of the following values:

    • true. Specifies to insert the record before the current record.

    • false. Specifies to insert the record after the current record.

  • bInternal can contain one of the following values:

    • true. Configures the object manager to not call the CanInsert method to determine whether or not the insert is valid. Configures Siebel Open UI to not send a postevent notification. You can use true only if specialized business component code calls the NewRecord method.

    • false. Configures the object manager to call the CanInsert method to determine whether or not the insert is valid. Configures Siebel Open UI to send a postevent notification.

  • pIdValue contains the value that Siebel Open UI uses as the Id for the new record. You can specify a value for pIdValue to create a new record with a row Id that you specify. If you do not specify pIdValue, or if it contains no value, then Siebel Open UI automatically creates a new value for the Id.

For examples that use the NewRecord method, see the following topics:

Note the following usage:

  • NewRecord can initialize a new record, and it can also initialize a new record that includes an association with a parent record.

  • You can configure Siebel Open UI to override the NewRecord method.

  • The NewRecord method returns an object that includes an error code and a return value. For more information, see Configuring Error Messages for Disconnected Clients and SetErrorMsg Method.

  • If you use NewRecord in a Siebel Mobile Disconnected environment, then NewRecord adds the record to the local database instead of the database that resides on the Siebel Server.