Step1: Download CUSTOM.pll to your local computer from server. Ensure all the libraries on your local computer under $AU_TOP / resource/ are in the proper direction. Copying all files from $AU_TOP / resources/ to ORACLE HOME / TOOLS / OPEN60/PLSQLIB (where ORACLE HOME is the home directory of Forms6i on your local machine) is an simple way to ensure sure you have all the libraries available.
Step2: Open CUSTOM.pll in Form Builder. You’ll note FNDSQF is the only connected library.

Step3: You will add the library to APPCORE2 such that the application in the CUSTOM.pll runs. To do so, first press Attached Libraries to access the Attach Library window and then press on the green plus button on the bottom. Browse on your local computer for APPCORE2.pll, and add it to CUSTOM.pll. When this is completed, APPCORE2.dll exists in the associated library folder.


Step4: In procedure event of the CUSTOM.pll body, comment out the following three lines
--begin
-- null;
--end event;
Then add the Script below
formname varchar2(30);
blockname varchar2(30);
begin
IF event_name = 'WHEN-NEW-FORM-INSTANCE'
THEN
IF FND_PROFILE.VALUE('USERNAME')='AUDITUSER'
THEN
BEGIN
COPY('Entering app_form.query_only_mode.','global.frd_debug');
COPY('YES', 'PARAMETER.QUERY_ONLY');
APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);
APP_MENU2.SET_PROP('FILE.ACCEPT', ENABLED,PROPERTY_OFF);
formname := NAME_IN('system.current_form');
blockname := GET_FORM_PROPERTY(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_BLOCK_PROPERTY(blockname, NEXTBLOCK);
END LOOP;
END;
END IF;
END IF;
end event;
Step5: Notice that I have made all AUDITUSER customer’s responsibilities read-only, You may customize them to your requirement. My body at CUSTOM.pll is set here.
f60gen module=CUSTOM.pll userid=apps/***** output_file=CUSTOM.plx module_type=LIBRARY