You are on page 1of 8

Infosys Ltd.

Enabling Attachment in Custom form

Enabling Attachment in Custom form

Enabling attachment in a custom form

A Custom form is designed in Oracle applications according to the requirements. The attachment functionality help the user accessing the custom form to have more details related to the data through notes, urls and files. This feature can be enabled using the Application Developer responsibility. Steps for enabling this functionality in a custom form are: 1. Register the table and primary key to be used as entity. Command for registering the table: BEGIN AD_DD.register_table ('FND',XXCNV_CONTROL_TEST_ALL,'T',512,10,70); END; Here register_table is a procedure with the parameters: procedure register_table (p_appl_short_name in varchar2, p_tab_name in varchar2, p_tab_type in varchar2, p_next_extent in number, p_pct_free in number, p_pct_used in number) Command for registering primary key.

BEGIN ad_dd.register_primary_key ('FND',RESOURCE_ID, XXCNV_CONTROL_TEST_ALL,

1 2012 Infosys Limited, India

Infosys Ltd.
RESOURCE_ID, 'S', 'Y', 'Y'); END;

Enabling Attachment in Custom form

Here register_primary_key is a procedure with the parameters: procedure register_column (p_appl_short_name in varchar2, p_tab_name in varchar2, p_col_name in varchar2, p_col_seq in number, p_col_type in varchar2, p_col_width in number, p_nullable in varchar2, p_translate in varchar2, p_precision in number default null, p_scale in number default null) Command for registering column. BEGIN ad_dd.register_column ('FND', XXCNV_CONTROL_TEST_ALL, RESOURCE_ID, 2, 'VARCHAR2', 50, 'N', 'Y'); END;

2. Enter Document Entities: It is used to define the entity to which we want to relate the attachment. i. Open the form. Navigation: Application Developer Attachments Document Entities ii. Create a record with the values: Table: Table name which is the data block of the form (XXCNV_CONTROL_TEST_ALL). Entity Id: Table name: XXCNV_CONTROL_TEST_ALL Entity Name: Object (XXCNV_CONTROL_TEST_ALL) Prompt: (Attachment) Application: User can choose from the list (Application Object Library)

2 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

3. Enter the details for attachment function: It is used to specify the level at which the attachment functionality will get enabled. iii. Open the form. Navigation: Application Developer Attachments Attachment Functions iv. In the Name field specify the form or function short name.

Here we are enabling this at form level.

4. Enter document categories to be available: Now, associate document categories which would be available as attachments for this form. Click on the Categories button available on Attachment Functions form and specify the categories of choice.

3 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

5. Enter the block details for which attachment has to be enabled: v. Enter the details for the block: Click on the blocks button available on Attachment Functions form and define a method, which can be Allow Change and Query Only. There can be more than one block per form.

6. Enter the details for Entities: Click on the entities button. Main Entity as display method is used if the entity selected is base entity while for the other entities, display method as Related Entity is used. Here, we are using Main entity for the sample.

4 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

Include in Indicator check box is used if you want the attachment icon to be displayed with the entity. On the Privileges Tab user can define the operations that could be available for the attachment. These operations include Query/Insert/Update and delete of attachments, which can vary on different conditions against a field on the block.

On the primary key fields, enter the fields used as the primary key for the table. Here, Resource_id is the primary key for the table used as document entity.

5 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

7. Check whether the form has been attached to the specified category . Open the form. Application Developer Attachments Document Category Query for the application as: Application Object Library. Select the assignments button for the category Miscellaneous. The form should open up. Here, on querying for the form EXP, it should retrieve the value which means that form is attached successfully to the specified category.

6 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

8. Validating the form and attachment functionality: Open the form. The paper clip icon in the toolbar for attachment should be enabled.

To attach a document, data has to be entered in the form or queried.

7 2012 Infosys Limited, India

Infosys Ltd.

Enabling Attachment in Custom form

Reference: http://knol.google.com/k/adding-attachment-functionality-to-forms#

8 2012 Infosys Limited, India