Consultor Eletrônico



Kbase P105193: How to override initial values via a SmartDataBrowser when adding a new row
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/16/2005
Status: Unverified

GOAL:

How to override initial values via a SmartDataBrowser when adding a new row

GOAL:

How to override initial values when adding a new row in the SmartDataObject

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
Dynamics

FIX:

Use the modifyNewRecord method.

Here?s a simple example for our Customer SDO, which initializes several of the fields assuming that the Customer is from New Hampshire:
Procedure modifyNewRecord:
/*-------------------------------------------------------------------------
Purpose: Custom code for new records to initialize some of the fields
in the Customer table.
Parameters: <none>
Notes: This is called automatically on Add or Copy.
-------------------------------------------------------------------------*/
ASSIGN b_customer.State = 'NH'
b_customer.phone = '(603)'
b_customer.fax = '(603)'
b_customer.postalcode = '030xx'
b_customer.comments = "Here's another New Hampshire Customer!".
END PROCEDURE.