Customize Attribute Defaults

Partial project attributes are defaulted using Groovy script, but if necessary we can change behavior for customer implementation.

Step-by-step guide

Prepare SQL script as necessary and execute on FlexDeploy database.

The following example is for EBS projects; OTHER object type and TARGET_LOCATION attribute for default script.  Note the use of FD_OBJECT_TYPE_OVERRIDES_EBS and OTHER_TARGET_LOCATION_DEFAULTSSCRIPT for DB Properties data in the SQL. This equates to FD_OBJECT_TYPE_OVERRIDES_<Project Type> and <Object Type_Code>_<Object Type Attribute Code>_DEFAULTSSCRIPT.

Other options are LISTDATA and VALIDATORSCRIPT (in place of DEFAULTSSCRIPT), which also can be overridden using the same mechanism.

For the changes to take effect, you can either wait 10 minutes for the cache to refresh, or work with your Administrator to the clear cache.  See Admin Operations.

Once you prepare Groovy script, each ' needs to be replaced with '' (2 single quotes) in SQL statement.

Object Type Codes and Object Type Attribute Codes are listed in the EBS Object Types Reference Guide.

Oracle Example
-- By default, SQL Plus treats '&' as a special character that begins a substitution string. 
-- This can cause problems when running scripts that happen to include '&' for other reasons.
set define off;

-- make sure to change DB_PROPERTIES_DATA_ID, DB_PROPERTIES_ID as appropriate.
UPDATE FD.OBJECT_ATTRIBUTE_DEF set OVERRIDE_DEFAULTS_SCRIPT='Y' 
where object_type_id=(select object_type_id from fd.object_type where project_type='EBS' and object_type_code='OTHER') 
and object_attribute_code='TARGET_LOCATION';
  
INSERT INTO FF.DB_PROPERTIES
(
DB_PROPERTIES_ID,
DB_PROPERTIES_NAME,
DB_PROPERTIES_KEY,
SEQUENCE_NUMBER,
DESCRIPTION,
IS_ACTIVE,
IS_REQUIRED,
IS_ENCRYPTED,
DATA_TYPE,
VALIDATION_SCRIPT,
VALIDATION_MESSAGE,
MIN_VALUE,
MAX_VALUE,
DISPLAY_ROWS,
DISPLAY_COLUMNS,
LIST_DATA,
CREATED_ON,
CREATED_BY,
UPDATED_ON,
UPDATED_BY,
VERSION_NUMBER
)
VALUES
(
-1,
'FD_OBJECT_TYPE_OVERRIDES_EBS',
'OTHER_TARGET_LOCATION_DEFAULTSSCRIPT',
0,
'Overriding default target location',
'Y',
'Y',
'N',
'String',
null,
null,
null,
null,
1,
1,
null,
sysdate,
user,
sysdate,
user,
1
);
  
INSERT INTO FF.DB_PROPERTIES_DATA
(
DB_PROPERTIES_DATA_ID,
DB_PROPERTIES_ID,
SEQUENCE_NUMBER,
DB_PROPERTIES_VALUE,
DESCRIPTION,
IS_ACTIVE,
CREATED_ON,
CREATED_BY,
UPDATED_ON,
UPDATED_BY,
VERSION_NUMBER
)
VALUES
(
-1,
-1,
0,
'dummy',
'',
'Y',
sysdate,
user,
sysdate,
user,
1
);

-- update 'dummy' value
-- this update can be run again to update the script after initial creation
BEGIN
update  FF.DB_PROPERTIES_DATA 
set DB_PROPERTIES_VALUE = 'APP_SHORT_NAME=FDEBS_APPLICATION_SHORT_NAME ?: FILE_PATH_PREFIX.split(''/'')[1];
TARGET_LOC=''$'' + APP_SHORT_NAME + ''_TOP/patch/115'';
VAR_EXT=FILE_EXTENSION == '''' || FILE_EXTENSION == null ? '''' : FILE_EXTENSION;
VAR_EXT=VAR_EXT.toUpperCase();
if (''''.equals(VAR_EXT) || ''EXP''.equals(VAR_EXT))
{
    TARGET_LOC=''$'' + APP_SHORT_NAME + ''_TOP/Interfaces/secure/scripts'';
}
return TARGET_LOC.replace(''//'',''/'');' where 
DB_PROPERTIES_ID = 8000 AND 
SEQUENCE_NUMBER = 0;
END;
/
  
commit;

Primary & Foreign Key

Primary keys FF.DB_PROPERTIES.DB_PROPERTIES_ID and FF.DB_PROPERTIES_DATA.DB_PROPERTIES_DATA_ID should use negative numbers, beginning at -1, to avo