BEGIN
IF event_name = ‘WHEN-NEW-FORM-INSTANCE’ THEN
IF FND_PROFILE.VALU E(’USER_NAME’)= ’XXXXXXX’ THEN /*ENTER THE USERNAME THAT IS USED BY AUDITORS*/
BEGIN
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_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_BLOCK_PROPERTY(blockname, NEXTBLOCK);
END LOOP ;
END query_only_mode;
END IF;
END IF;
END;