Standard Attachments in Oracle Form

默认情况下“附件”按钮是灰色的,本文将展示如何让某个Form的附件按钮变亮,并能上传附件.

以用户Form为例,我们想让用户上传自己的照片

Pre-Setups

Help > Diagnostics > Custom Code > Personalize,记录下Function Name

并用Help > Diagnostics > Examine查看User Name字段和User ID字段对应的Field名称

我们将会在后边的步骤里使用USER_ID和USER_NAME

Setups

接下来就在Application Developer职责下,要配置Attachment

Step 1: Create document entity

Navigation: Application Developer > Responsibility > Attachments > Document Entities

(Entity:An entity is an object within Oracle Applications data, such as an item, an order, or anorder line. The attachments feature must be enabled for an entity before users can link attachments to the entity.)

Step 2: Create attachment function

Navigation: Application Developer > Responsibility > Attachment > Attachment Functions

选择Function,Name就是我们在文章刚开始时,查得的Function Name。再点Category,选择附件类型

Block,Entity为Block的名称

Entities

Step 3: Add document category

Navigation:Application Developer > Responsibility > Attachment > Document Categories

(Category:A document category is a label that users apply to individual attachments and documents. Document categories provide security by restricting the documents that can be viewed or added via a specific form or form function.
In the below example i am trying to enable the attachment funcionality for the USer form..I want to upload the approval copy for creating a user or attaching new responsibility)

Save the form. Click on Assignments button.
The default Type is Function. Add the name of the function, i.e. Users (This is the User Name of the function defined in Attachment Functions form).

这样附件的设置就算完成了。可以到用户form上,可以看到附件的按钮就变亮了。

点附件按钮,就可以上传附件了

上传之后

Query To Check

=================================================

Attachment Related Tables

1. FND_DOCUMENTS

2. FND_ATTACHED_DOCUMENTS

3. FND_DOCUMENTS_TL

4. FND_DOCUMENT_DATATYPES.

5. FND_DOCUMENT_CATEGORIES

6. FND_DOCUMENTS_LONG_TEXT (Long text type attachment).

7. FND_DOCUMENTS_SHORT_TEXT (Short text type attachment).

8. FND_DOCUMENTS_LONG_RAW

9. FND_LOBS (File type attachments).

FND_DOCUMENTS:

FND_DOCUMENTS stores language-independent information about a document. For example, each row contains a document identifier, a category identifier, the method of security used for the document (SECURITY_TYPE, where 1=Organization,2=Set of Books, 3=Business unit,4=None), the period in which the document is active, and a flag to indicate whether or not the document can be shared outside of the security type (PUBLISH_FLAG).

Other specifications in this table include: datatype (DATATYPE_ID, where 1=short text,2=long text, 3=image, 4=OLE object), image type, and storage type (STORAGE_TYPE, where 1=stored in the database, 2=stored in the file system).

The document can be referenced by many application entities and changed only in the define document form (USAGE_TYPE=S); it can be used as a fill-in-the-blanks document, where each time you use a template, you make a copy of it (USAGE_TYPE=T); or it can be used only one time (USAGE_TYPE=O).Images and OLE Objects cannot be used as templates.

FND_ATTACHED_DOCUMENTS:

FND_ATTACHED_DOCUMENTS stores information relating a document to an application entity.  For example, a record may link a document to a sales order or an item. Each row contains foreign keys to FND_DOCUMENTS and FND_DOCUMENT_ENTITIES. There is also a flag to indicate whether or not an attachment was created automatically.

FND_DOCUMENTS_TL:

FND_DOCUMENTS_TL stores translated information about the documents in FND_DOCUMENTS. Each row includes the document identifier, the language the row is translated to, the description of the document, the file in which the image is stored, and an identifier (MEDIA_ID) of the sub-table in which the document is saved (FND_DOCUMENTS_SHORT_TEXT, FND_DOCUMENTS_LONG_TEXT, or FND_DOCUMENTS_LONG_RAW).

FND_DOCUMENT_DATATYPES:

FND_DOCUMENT_DATATYPES stores the document datatypes that are supported. Initial values are: short text, long text, image, and OLE Object (DATATYPE_ID=1, 2, 3, or 4). Customers can add datatypes to handle documents stored outside of Oracle and use non-native Forms applications to view/edit their documents. The table uses a “duplicate record” model for handling multi-lingual needs. That is, for each category there will be one record with the same CATEGORY_ID and CATEGORY_NAME for each language.

FND_DOCUMENT_CATEGORIES:

FND_DOCUMENT_CATEGORIES stores information about the categories in which documents are classified. For example, documents may be considered “Bill of Material Comments”, “WIP Job Comments”, etc. Document categories are used to provide a measure of security on documents. Each form that enables the attachment feature lists which categories of documents can be viewed in the form. This table uses a “duplicate record” model for handling multi-lingual needs.

FND_DOCUMENTS_LONG_TEXT:

FND_DOCUMENTS_LONG_TEXT stores information about long text documents.

FND_DOCUMENTS_SHORT_TEXT:

FND_DOCUMENTS_SHORT_TEXT stores information about short text documents.

FND_DOCUMENTS_LONG_RAW:

FND_DOCUMENTS_LONG_RAW stores images and OLE Objects, such as Word Documents and Excel spreadsheets, in the database.

FND_DOCUMENT_ENTITIES:

FND_DOCUMENT_ENTITIES lists each entity to which attachments can be linked. For example, attachments can be linked to Items, Sales Orders, etc. Since the table uses a “duplicate record” model for handling multi-lingual needs, for each document entity there will be one record with the same DOCUMENT_ENTITY_ID and DATA_OBJECT_CODE for each language.

Useful Queries

To find all Long Text attachments:

SELECT

FAD.SEQ_NUM "Seq Number",

FDAT.USER_NAME "Data Type",

FDCT.USER_NAME "Category User Name",

FAD.ATTACHED_DOCUMENT_ID "Attached Document Id",

FDET.USER_ENTITY_NAME "User Entity",

FD.DOCUMENT_ID "Document Id",

FAD.ENTITY_NAME "Entity Name",

FD.MEDIA_ID "Media Id",

FD.URL "Url",

FDT.TITLE "Title",

FDLT.LONG_TEXT "Attachment Text"

FROM

FND_DOCUMENT_DATATYPES FDAT,

FND_DOCUMENT_ENTITIES_TL FDET,

FND_DOCUMENTS_TL FDT,

FND_DOCUMENTS FD,

FND_DOCUMENT_CATEGORIES_TL FDCT,

FND_ATTACHED_DOCUMENTS FAD,

FND_DOCUMENTS_LONG_TEXT FDLT

WHERE

FD.DOCUMENT_ID = FAD.DOCUMENT_ID

AND FDT.DOCUMENT_ID = FD.DOCUMENT_ID

AND FDCT.CATEGORY_ID = FD.CATEGORY_ID

AND FD.DATATYPE_ID = FDAT.DATATYPE_ID

AND FAD.ENTITY_NAME = FDET.DATA_OBJECT_CODE

AND FDLT.MEDIA_ID = FD.MEDIA_ID

AND FDAT.NAME = \'LONG_TEXT\';

To find all Short Text attachments:

SELECT

FAD.SEQ_NUM "Seq Number",

FDAT.USER_NAME "Data Type",

FDCT.USER_NAME "Category User Name",

FAD.ATTACHED_DOCUMENT_ID "Attached Document Id",

FDET.USER_ENTITY_NAME "User Entity",

FD.DOCUMENT_ID "Document Id",

FAD.ENTITY_NAME "Entity Name",

FD.MEDIA_ID "Media Id",

FD.URL "Url",

FDT.TITLE "Title",

FDST.SHORT_TEXT "Attachment Text"

FROM

FND_DOCUMENT_DATATYPES FDAT,

FND_DOCUMENT_ENTITIES_TL FDET,

FND_DOCUMENTS_TL FDT,

FND_DOCUMENTS FD,

FND_DOCUMENT_CATEGORIES_TL FDCT,

FND_ATTACHED_DOCUMENTS FAD,

FND_DOCUMENTS_SHORT_TEXT FDST

WHERE

FD.DOCUMENT_ID = FAD.DOCUMENT_ID

AND FDT.DOCUMENT_ID = FD.DOCUMENT_ID

AND FDCT.CATEGORY_ID = FD.CATEGORY_ID

AND FD.DATATYPE_ID = FDAT.DATATYPE_ID

AND FAD.ENTITY_NAME = FDET.DATA_OBJECT_CODE

AND FDST.MEDIA_ID = FD.MEDIA_ID

AND FDAT.NAME = \'SHORT_TEXT\';

WEBPAGE ATTACHMENT

SELECT DISTINCT

AD.SEQ_NUM ,

DCT.USER_NAME ,

DAT.USER_NAME ,

D.STORAGE_TYPE ,

D.FILE_NAME ,

D.IMAGE_TYPE ,

D.USAGE_TYPE ,

AD.AUTOMATICALLY_ADDED_FLAG ,

AD.ATTACHED_DOCUMENT_ID ,

DET.USER_ENTITY_NAME ,

D.DATATYPE_ID ,

DAT.NAME ,

D.DOCUMENT_ID ,

D.START_DATE_ACTIVE ,

D.END_DATE_ACTIVE ,

D.SECURITY_TYPE ,

D.SECURITY_ID ,

D.PUBLISH_FLAG ,

AD.CREATED_BY ,

DET.USER_ENTITY_PROMPT ,

AD.ENTITY_NAME ,

AD.COLUMN1 ,

AD.PK1_VALUE ,

D.MEDIA_ID ,

D.CATEGORY_ID ,

D.URL ,

DT.TITLE

FROM FND_DOCUMENT_DATATYPES DAT,

FND_DOCUMENT_ENTITIES_TL DET ,

FND_DOCUMENTS_TL DT ,

FND_DOCUMENTS D ,

FND_DOCUMENT_CATEGORIES_TL DCT ,

FND_ATTACHED_DOCUMENTS AD

WHERE D.DOCUMENT_ID = AD.DOCUMENT_ID

AND DT.DOCUMENT_ID = D.DOCUMENT_ID

AND DCT.CATEGORY_ID = D.CATEGORY_ID

AND D.DATATYPE_ID = DAT.DATATYPE_ID

AND AD.ENTITY_NAME = DET.DATA_OBJECT_CODE

AND DAT.name = \'WEB_PAGE\';

FILE ATTACHMENT

SELECT

AD.SEQ_NUM ,

DCT.USER_NAME ,

DAT.USER_NAME ,

AD.ATTACHED_DOCUMENT_ID ,

DET.USER_ENTITY_NAME ,

DAT.NAME ,

D.DOCUMENT_ID ,

AD.ENTITY_NAME ,

AD.PK1_VALUE ,

D.MEDIA_ID ,

D.URL ,

DT.TITLE ,

DBMS_LOB.SUBSTR(L.file_data,1,10) file_data

FROM FND_DOCUMENT_DATATYPES DAT,

FND_DOCUMENT_ENTITIES_TL DET ,

FND_DOCUMENTS_TL DT ,

FND_DOCUMENTS D ,

FND_DOCUMENT_CATEGORIES_TL DCT ,

FND_ATTACHED_DOCUMENTS AD ,

FND_LOBS L

WHERE D.DOCUMENT_ID = AD.DOCUMENT_ID

AND DT.DOCUMENT_ID = D.DOCUMENT_ID

AND DCT.CATEGORY_ID = D.CATEGORY_ID

AND D.DATATYPE_ID = DAT.DATATYPE_ID

AND AD.ENTITY_NAME = DET.DATA_OBJECT_CODE

AND L.FILE_ID = D.MEDIA_ID

AND DAT.name = \'FILE\';

Find the functions using attachments

SELECT

AD.SEQ_NUM ,

DCT.USER_NAME ,

DAT.USER_NAME ,

AD.ATTACHED_DOCUMENT_ID ,

DET.USER_ENTITY_NAME ,

DAT.NAME ,

D.DOCUMENT_ID ,

AD.ENTITY_NAME ,

AD.PK1_VALUE ,

D.MEDIA_ID ,

D.URL ,

DT.TITLE ,

AF.FUNCTION_NAME ,

AF.FUNCTION_TYPE

FROM FND_DOCUMENT_DATATYPES DAT,

FND_DOCUMENT_ENTITIES_TL DET ,

FND_DOCUMENTS_TL DT ,

FND_DOCUMENTS D ,

FND_DOCUMENT_CATEGORIES_TL DCT ,

FND_DOC_CATEGORY_USAGES DCU ,

FND_ATTACHMENT_FUNCTIONS AF ,

FND_ATTACHED_DOCUMENTS AD

WHERE 1 = 1

AND D.DOCUMENT_ID = AD.DOCUMENT_ID

AND DT.DOCUMENT_ID = D.DOCUMENT_ID

AND DCT.CATEGORY_ID = D.CATEGORY_ID

AND DCU.CATEGORY_ID = D.CATEGORY_ID

AND DCU.ATTACHMENT_FUNCTION_ID = AF.ATTACHMENT_FUNCTION_ID

AND D.DATATYPE_ID = DAT.DATATYPE_ID

AND AD.ENTITY_NAME = DET.DATA_OBJECT_CODE

AND DCU.ENABLED_FLAG = 'Y';

Standard Attachments in Oracle Form 标准附件的更多相关文章

  1. [转]Oracle Form 触发器执行顺序

    Trigger 不是数据库中的触发器,不过功能类似,都是当某个事件发生的时候会触发. Trigger中可以编写代码,当对应事件发生的时候就会执行该Trigger中的代码. Oracle Form中的T ...

  2. 【翻译自mos文章】OGG的集成捕捉模式支持Oracle database标准版么?

    OGG的集成捕捉模式支持Oracle database标准版么? 来源于: Does OGG 11.2.1 Integrated Capture Work with Oracle Database S ...

  3. [Form Builder]Oracle Form系统变量中文版总结大全

    转:http://yedward.net/?id=57 Form中的系统变量,它存在于一个Form的整个运行时期的会话之中,变量包含了有关Form相关属性的字节信息.有些变量标明了当前状态,还有些变量 ...

  4. oracle form 触发器执行顺序及键定义[Z]

    1当打开FORM时: (1)PRE-FORM (2)PRE-BLOCK(BLOCK级) (3)WHEN-NEW-FORM-INSTANCE (4)WHEN-NEW-BLOCK-INSTANCE (5) ...

  5. JSTL(JSP Standard Tag Library ,JSP标准标签库)

    JSTL标签之核心标签   JSTL(JSP Standard Tag Library ,JSP标准标签库)是一个实现 Web应用程序中常见的通用功能的定制标记库集,这些功能包括迭代和条件判断.数据管 ...

  6. Oracle Form Builder

    Oracle Form Builder 是Oracle的一个开发工具,可以针对Oracle公司的E-Business Suit的ERP系统开发的.对应的还有reports builder. Oracl ...

  7. Oracle Form's Trigger Tutorial With Sample FMB

    Created an Oracle Form to handle specific events / triggers like When-New-Form-Instance, Pre-Insert, ...

  8. ASP.NET-AJAX.FORM提交附件失败

    尝试了不少时间在AJAX.FORM提交附件,发现完全不行,经过下面的这个博客的介绍,使用ajax.form.js插件提交成功,记录一下该博文网址和结论: 相关网址:http://www.cnblogs ...

  9. php spl标准库简介(SPL是Standard PHP Library(PHP标准库)(直接看代码实例,特别方便)

    php spl标准库简介(SPL是Standard PHP Library(PHP标准库)(直接看代码实例,特别方便) 一.总结 直接看代码实例,特别方便易懂 thinkphp控制器利眠宁不支持(说明 ...

随机推荐

  1. 通过sql做数据透视表,数据库表行列转换(pivot和Unpivot用法)(一)

    在mssql中大家都知道可以使用pivot来统计数据,实现像excel的透视表功能 一.MSsqlserver中我们通常的用法 1.Sqlserver数据库测试 ---创建测试表 Create tab ...

  2. Easyui tabs的herf和content属性

    在backstage.jsp页面中我写了一个方法,用于在指定位置添加面板(id为msg的地方)function addTab(t,h){ if($('#msg').tabs('exists',t)){ ...

  3. Css颜色定义的方法汇总color属性设置方式

    颜色的定义方式用rgb()里面带上十进制的数字来定义. color:rgb(211,123,135); 用预定义的颜色名称. color:red; rgba()最后一个参数是不透明度. color:r ...

  4. Java实战之04JavaWeb-05事务和连接池

    一.事务部分 1.事务的简介 做一件事情,这个一件事情中有多个组成单元,这个多个组成单元要不同时成功,要不同时失败.A账户转给B账户钱,将A账户转出钱的操作与B账户转入钱的操作绑定到一个事务中,要不这 ...

  5. [leetcode] 405. Convert a Number to Hexadecimal

    https://leetcode.com/contest/6/problems/convert-a-number-to-hexadecimal/ 分析:10进制转换成16进制,不能用库函数,刚开始,我 ...

  6. 暑假集训(2)第三弹 ----- 食物链(poj1182)

    C - 食物链 Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:10000KB     64bit ...

  7. https证书申请

     因为要为海外组的aws设置https证书,由于使用的是新的域名,所以要先申请购买证书,然后设置上去.由于是第一次做这件事.所以过程有些坎坷.      先购买https证书.看了几家,感觉GoDad ...

  8. csdn博客刷点击率代码

    此文为转载,亲测有效. import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; impo ...

  9. 一台Ubuntu server上安装多实例MySQL

    受环境所迫,在一台Ubuntu server上安装多个实例MySQL. 手动安装MySQL 环境:Ubuntu server 11.10 64bit + mysql-5.5.17-linux2.6-x ...

  10. C#线程总结

    using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...