Oracle EBS FORM 更改记录状态

get到一个新的思路。

因为validate触发器是无法做go_block或者loop操作的,因此可以尝试修改数据块属性,将状态更新为改动的,触发 ON-UPDATE 触发器,将循环或者跳转语句加入到 ON-UPDATE 程序中。 当然,前提是这个数据块不是基于表/视图的,仅是显示块,因此不需要添加 ON-INSERT 触发器。当然为了避免后台抛出异常,给相应的数据块添加 ON-LOCK 触发器,对应的程序为 null;

以下,是更改记录:

SET_RECORD_PROPERTY(GET_BLOCK_PROPERTY('HEADER',CURRENT_RECORD),'HEADER',STATUS,CHANGED_STATUS);

贴出help:

Description Sets the specified record property to the specified value. Syntax SET_RECORD_PROPERTY(record_number NUMBER, block_name VARCHAR2, property NUMBER, value NUMBER); Built-in Type unrestricted procedure Enter Query Mode yes Parameters record_number  Specifies the number of the record whose status you want to set. The record number is the record's position in the block. Specify as a whole number.  block_name  Specifies the name of the block in which the target record exists. The data type of the name is VARCHAR2.  property  Use the following property:  STATUS Specifies that you intend to change the record status. STATUS is a constant.  value  Use one of the following values: CHANGED_STATUS Specifies that the record should be marked for update and should be treated as an update when the next commit action occurs. INSERT_STATUS Specifies that the record is to be marked as an INSERT and should be inserted into the appropriate table when the next commit action occurs. NEW_STATUS Specifies that the record is to be treated as a NEW record, that is, a record that has not been marked for insert, update, or query. Changed but uncleared or uncommitted records cannot be assigned a status of NEW. QUERY_STATUS Specifies that the record is to be treated as a QUERY record, whether it actually is. See also the CREATE_QUERIED_RECORD built-in. SET_RECORD_PROPERTY Restrictions The following table illustrates the valid transition states of a record. Current Status Target Status NEW QUERY INSERT CHANGEDNEW yes yes1 yes2 noQUERY yes4 yes no yesINSERT yes4 yes3 yes noCHANGED yes4 no no yesAdheres to the rules described in footnotes 2 and 3. This transition is not allowed in query mode, because QUERY and INSERT are not valid in query mode. If this transition is performed while Runform is running in Unique Key mode and not all of the transactional triggers exist, then you must enter a valid value in the ROWID field. Put another way, if you are connected to a non-ORACLE data source that does not support ROWID, but you are using a unique key, you must supply the key for a record that goes from Insert to Query, in one of the transactional triggers, either On-Lock, On-Update, or On-Delete. Otherwise Oracle Forms returns an error. Records that have been changed but not yet committed or cleared cannot be assigned a status of NEW.

上一篇:项目一:第十二天 1、常见权限控制方式 2、基于shiro提供url拦截方式验证权限 3、在realm中授权 5、总结验证权限方式(四种) 6、用户注销7、基于treegrid实现菜单展示


下一篇:js 随机数 洗牌算法