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. const char*、char*、char* const、char[]、string的区别

    1.const char* p: p is a pointer to const char(char const* p 一样)   意思就是不能通过p指针来修改p指向的内容(但是内容可以修改). 2. ...

  2. C++中const修饰基本数据类型、指针、引用、对象

    const修饰基本数据类型 #include <iostream> using namespace std; void main(){ const int a = 1; const cha ...

  3. cookie、localStorage、sessionStorage之间的区别

    sessionStorage 和 localStorage 是HTML5 Web Storage API 提供的,可以方便的在web请求之间保存数据.有了本地数据,就可以避免数据在浏览器和服务器间不必 ...

  4. 使用WebClient上传文件时的一些问题

    最近在使用WebClient做一个客户端上传图片到IIS虚拟目录的程序的时候,遇到了一些问题,这里主要给出参考步骤分享给大家. 测试环境 服务器端:Windows Server 2003,IIS6.0 ...

  5. MySQL查看和修改字符编码

    MySQL的默认编码是Latin1,不支持中文,要支持中午需要把数据库的默认编码修改为gbk或者utf8. 1.需要以root用户身份登陆才可以查看数据库编码方式(以root用户身份登陆的命令为:&g ...

  6. Css3 阴影效果

    box-shadow:#333 0 0 5px 10px; //上下左右有阴影-webkit-box-shadow: #666 0px 5px 10px; -moz-box-shadow: #666 ...

  7. C#多线程(二)

    一.线程池 每次创建一个线程,都会花费几百微秒级别的时间来创建一个私有的局部栈,每个线程默认使用1M的内存.这个可以在使用Thread类的构造函数时设置: new Thread(new ThreadS ...

  8. 在SQL中导入Excel数据时强制以文本类型导入

    Excel不是关系型数据库,在导入到sql中时对于数值型,sql有时int型会处理成float,有时数字文本混排的列,sql会认为是数值型,导入的结果有的数据变成了null,但是用sql导出excel ...

  9. 1.0 基础、标示符、常量、数据类型(enum 枚举,struct 结构体)、操作符、循环、数组

    一.程序 现实生活中,程序是指完成某些事务的一种既定方法和过程,可以把程序看成是一系列动作执行过程的描述. 在计算机世界,程序是指令,即为了让计算机执行某些操作或解决某个问题而编写的一系列有序指令的集 ...

  10. 分享零基础学习Hadoop方法

    (我不是Hadoop专家,也只是一个初学者,这里我也只是就自己的学习体会,站在初学者的角度谈一下如何入门.) 首先我觉得应该思考这样一个问题:Hadoop对于我们来讲,是一种工具,那么Hadoop帮助 ...