[Code Sample]loop trough all blocks of a form
.....formname := NAME_IN(\'system.current_form\');blockname := GET_FORM_PROPERY(formname, FIRST_BLOCK);WHILE (blockname is not null) LOOP IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE); SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE); SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE); END IF;blockname := GET_BLO
[Code Sample]loop trough all records of a block
Sample 1:declare currRec integer; begin -- go to the desired block navigate_to_block(\'BLOCK_NAME\'); -- save the current record position currRec := :system.cursor_record; first_record(); loop IF :SYSTEM.LAST_RECORD = \'TRUE\' THEN exit; ELSE next_record; END IF; end loop; -- go back to the original record position go_record (currRec); end; Sample 2:declare number_of_records number; where_am_i number; l_deptno dept.deptno
Custom.pll example to make DFF read only
在特定的职责下,让DFF只读 /* *************************** Code to make DFF Read Only ****************** */ IF (event_name = \'WHEN-NEW-BLOCK-INSTANCE\' AND form_name = \'PERWSEAD\' AND block_name = \'ABA\') THEN IF (FND_PROFILE.VALUE(\'RESP_NAME\')IN (\'Vision HR Manager\' ,\'XYZ HR Manager\')) THEN fnd_descr_flex.update_definition ( BLOCK => \'ABA\' ,FIELD => \'DF\' ,READ_ONLY => \'Y\' ); END IF; END IF; /* *************************** End of The Code *************
Sample of API FND_PROFILE
1. FND_PROFILE.GET(‘Name of the Profile’, variable name);SELECT fnd_profile.value(\'PROFILEOPTION\') ,fnd_profile.value(\'MFG_ORGANIZATION_ID\') ,fnd_profile.value(\'ORG_ID\') ,fnd_profile.value(\'LOGIN_ID\') ,fnd_profile.value(\'USER_ID\') ,fnd_profile.value(\'USERNAME\') ,fnd_profile.value(\'CONCURRENT_REQUEST_ID\') ,fnd_profile.value(\'GL_SET_OF_BKS_ID\') ,fnd_profile.value(\'SO_ORGANIZATION_ID\') ,fnd_profile.value(\'APPL_SHRT_NAME\')
Oracle API Availability – Profile
zz:http://www.oracleappshub.com/api/oracle-api-availability-profile/ In oracle user Profile functionality is provided in the FND_PROFILE package and the FNDSQF library. What is inside this API: Retrieve user profile values for the current run-time environmentSet user profile values for the current run-time environment There are various Objects that can be used with this API\'s. These are discussed below: 1. Put :This can be used to put a value to the specified user profi
[Code Sample]Alert "Do you want to save the changes you have made?"
1: When exiting form, Check the form status. 2: If the status is changed, then display the customized alert.in a KEY-EXIT trigger at form level, enter the following code: declare button_val number; begin -- Perform validation at item level to update :SYSTEM.FORM_STATUS. validate(ITEM_SCOPE); -- Check the record status if(:SYSTEM.FORM_STATUS = \'CHANGED\') then button_val := show_alert(\'ask_commit\'); if button_val = ALERT_BUTTON1 then -- If user chooses to commit changes...