I want to save the log in username

Dear all
I have a complicated problem.I will explain it in four steps.
1- My application authentication depends on database users. I mean , the users who log in to the application are actually database users.
Every table contains "CREATED_BY" column. And this column is auto populated by database trigger
:NEW.CREATED_BY := USER;For example : Account "Tarek" is for an employee tarek . and this account is actually a database user . User "HR" is the schema owner. "HR" grants select ,insert on HR.Employee to user "Tarek".
In order to save the username "Tarek" who log in the application , I have to implement dynamic credential. And In fact I succeeded to do this using the following demo
[11g dynamic credential|http://www.4shared.com/rar/ektOYBXl/11gDynamicCredentials_2.html]
Until this point I managed to save the username "Tarek" who log in the application instead of "HR"
2- The problem happens when i decided to integrate my ADF application with another one .
My application name is "HrMainApplication" , implements dynamic credentials and connects to HR schema with application module "MainAppModule".
The Other application name is "PayrollApplication" , it does not implement dynamic credential , it only contains one bounded task flow"payroll-flow" with page fragment, and it connects to the same HR schema with application module name "PayRollAppModule"
3- I deployed "PayrollApplication" as adf jar library.
4- I added this jar to the main application "HrMainApplication"
5- I added the "payroll-flow" taskflow as a region in Main.jspx in the main application
6-Now I run the Login page and i connected using user "Tarek" and go to the main page.
7*-I inserted a new row and I hit commit . Data is now saved. But "Created_by" field value is "HR" not "Tarek".*
This is the problem
It seems that the "PayrollApplication" still connects to the database useing HR user not "tarek"
Should I re-implement dynamic credential in "PayrollApplication" again. And if so , how can I pass the login username to the application.
Thanks

Hi user,
Welcome to OTN world.Always share your Jdev version.
Why are you not storing the login user name into a session variable and store it into your table.

Similar Messages

  • C# - How do I read the logged-in username?

    Hi,
    I am looking for a way, to retrieve the logged-in username.
    Just like:
    User.Identity.Name;
    The Windows username and Novell username are not always the same, so I can't use this method.
    Regards,
    Kim Bang

    You want to "read the Novell username", but the problem is that one PC can
    be logged in with multiple identities to multiple trees/servers
    I suggest to take a look at the linked articles to understand the
    architecture, and deicide on your approach;
    then if you have eDirectory specific questions post in this forum
    http://forums.novell.com/novell-prod.../edir-windows/
    if you decide to go for ActiveX you'll find the Novell ActiveX controls are
    deprecated (the forum may be closed, but still can be searched for info),
    but may still be helpful:
    http://www.novell.com/developer/ndk/...supported.html.
    The NWSess control would get you what you need.
    Wolfgang
    "kimbang" wrote in message news:[email protected]..
    Thank you for your reply.
    The idea is, that my webapp (ASP.NET) can read the Novell username on
    the client pc (Windows XP).
    Just like you can read the Windows username. The webserver (IIS) is
    running locally on the network, that is also why the Windows username
    works, because that wouldn't be the case with a remote webserver.
    Wether or not I'm in the right forum I do not know. I was requested to
    find out, how to do the above, and I am not really that much in to
    Novell unfortunatly.
    But if i am in a wrong category, I would very much like to know which
    is the rigth one for this questing.
    kimbang
    kimbang's Profile: http://forums.novell.com/member.php?userid=102779
    View this thread: http://forums.novell.com/showthread.php?t=430307

  • How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    Hi
    Please take a look to this thread Re: Can I refresh the browser rather than open a new tab?

  • Main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)

    main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)
    The path(Grundpfad)for the excel file should be inserted in the main.vi.

    1. There's a shipping example called Write Table To XL.vi (Help>Find Examples>Communicating with External Applications>ActiveX>Excel) that you can use as a starting point.
    2. Buy the LabVIEW Report Generation Toolkit. Info can be found here.
    3. Search this forum for other examples of writing to Excel.

  • I have a new iPhone for work, set up on a new iTunes account (PC).  I was told i can associate it to my home iTunes account (iMac) but don't know how.  I want to save the work related apps as well.  Any advice?  Thanks

    I have a new iPhone for work, set up on a new iTunes account (PC).  I was told i can associate it to my home iTunes account (iMac) but don't know how.  I want to save the work related apps as well.  Any advice?  Thanks

    Thanks. I messed up with my husbands iphone because I was told the wrong thing. Now everytime I sync his phone it makes it look just like the other phone I had. Do you know how I can fix taht for his phone? Any settings I can turn off that will prevent all of my apps/contacts, etc from auto populating his phone?

  • How to suppress 'Do u want to save the changes?'  When there are no changes

    Hi All,
    I have developed one form,which contains 3 blocks in that 2 are database blocks and one is control block.It's working fine.When I close the form without doing any change also it is showing an alert as 'Do you want to save the changes you have made?'. How can I suppress that alert when I haven't made any change to the form.
    I am displaying one filed in the database block as 'null' until check box is checked.For that I have written code in when-new-block-instance trigger of that block.
    There I wrote SET_RECORD_PROPERTY (GET_BLOCK_PROPERTY (:SYSTEM.TRIGGER_BLOCK, CURRENT_RECORD), :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS); also to change the block status as query.
    But it is not working, still I am getting the alert,How can I solve this could anyone please give me a suggestion..
    Thanks in advance.

    So, this functionality can be done through CHECK BOX itself. Why you are making null by WHEN-NEW-BLOCK-INSTANCE. You can just set the update and insert property for that fields and rest things you can control from chexbox. And WHEN-BLOCK-INSTANCE-TRIGGER will fire once when you will access that block. If you want to set the same functionality for each record. Then you must use WHEN-NEW-RECORD-INSTANCE. for ex.
    Trigger = WHEN-NEW-RECORD-INSTANCE (BLOCK-LEVEL)
    Here i will assume that if check box is checked then he can update that fields.
    IF :CHECKBOX='Y' THEN
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
    ELSE
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
    END IF;In the above code no need for set value to NULL.
    And on CHECK BOX you can write like this...
    Trigger WHEN-CHECKBOX-CHANGED (ITEM-LEVEL)
    IF :CHECKBOX='Y' THEN
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
    ELSE
      :FIELD_NAME:=NULL;  -- here if check box is unchecked then it will set value to NULL
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
    END IF;-Ammad

  • How to avoid the message "Do you want to save the changes you have made?"

    i have 3 forms
    master block
    detail1 block of master
    detail2 block of detail1
    when i go out of detail1 and detail2 blocks after doing some modifications it asks me "Do you want to save the changes you have made"?
    i want to avoid this message as well as my changes should be posted in the database. what is the solution for this big pblm?

    hi
    may be you are trying to modify the database item or reassigning the database item value which is not actually needed.
    try to comment the reassigning database values
    and give clear_form(do_commit);
    most probably u will not get the message again
    Regards
    Rajdeep .A

  • Set Adobe Acrobat XI Pro. When I want to save the file in WORD, EXCEL or esporta file into ... immediately throws an error "save as failed to process this document no file was created". What's the problem?

    Set Adobe Acrobat XI Pro. When I want to save the file in WORD, EXCEL or esporta file into ... immediately throws an error "save as failed to process this document no file was created".
    What's the problem?
    Any help in finding a solution is greatly appreciated.
    Thank you,

    Installed AcrobatXI PRO 11.0.09  on seven computers and laptops. Two of them gives an error when you try to save a document in WORD, EXCEL, Power Point, or when exporting to... error: Save failed to process this document. No File was created.
    But all good saves in the format of TXT and jpg.
    I have uninstalled and restored and re-installed and updated and registry cleaned and removed using the special utility Cleaner Tool for Acrobat, but nothing helps.
    On one notebook with Windows 8.1 and Microsoft office 2013, on another laptop with Windows 7 and Microsoft office 2010, the same problem, although there are computers with Windows 7 and Microsoft office 2010 and everything works.
    Tell me where to find the problem and how to solve it.
    Thank you.

  • Dialog Box as "Do you want to save the changes?" in Forms.

    Hi,
    I have 4 datablocks in my forms that corresponds View.
    In the form design, I have a canvas(multiple inserting design) with two buttons that calls the other two blocks.
    Am inserting the records in the following way,
    In first record,
    am entering the value in one block, then a button-press event and so it opens another canvas where I enter some values then return to my main canvas. This is one row.
    But while I try to insert in the second row, there arises the dialog box as "Do you want to save the changes"?
    I should not get that dialog box.
    Please suggest me with the solution.
    Regards,
    Mini

    Thanks for the response,
    Let me clearly explain.
    I have 3 blocks created from view not table.
    I have a canvas in the multiple display layout i.e Number of items displayed is 10.
    In that canvas, I have set the two buttons. the button event is calling another canvas.
    Am inserting a record in the first row in the following sequence.
    Inserting the values for some fields in the main canvas, then entering the button, it opens another canvas that responds to another block, there am entering some values and closing the button event canvas, then returning to my main canvas, then entering the remaining fields with the values, thus my first row ends.
    Now I want to enter the values in the second row, while I navigate from the first Row to the Second row, there arises the dialog box as to save the changes or not?
    I should not get the dialog box.
    Am inserting the values in the database using Insert statements in all the blocks.
    Hope U understand the issue.
    Suggest me with the solution.
    Regards,
    Mini.

  • When I try to open a pdf link in my browser I am asked where I want to save the file.  I used to be asked if I wanted to open the file.  How do I get back to being asked if I want to open rather than save?

    When I try to open a pdf link in my browser I am asked where I want to save the file.  I used to be asked if I wanted to open the file.  How do I get back to being asked if I want to open rather than save?

    What browser?

  • HT1553 Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!

    Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!
    http://support.apple.com/kb/HT1553

    Repair permissions and restart your computer.  If this does not work, zap the pram.  You should now see your external hard drive. 

  • Forms6i question - Do you want to save the changes you have made !!

    Hi,
    I'm developing a custom master-detail form for 11i e-Business Suite. The requirement is to programmatically default values for some of the base table items when entering the master record.. Both the master and the detail blocks are base table blocks and defined the relation between these 2 as well..
    So i have coded my defaulting logic in the "when-new-record-instance " trigger only when the "(:system.record_status IN ('NEW','INSERT' ) AND :system.mode <> 'ENTER-QUERY')"..
    This is working but the problem is even when i do not change any values in the master block and i try to exit out of the form, getting a message "Do you want to save the changes you have made ".. I want to get that message only when some thing else is changed/entered in the master block or when any new detail records has been entered for that master block.
    Thanks in advance
    Shree

    Shree,
    It sounds like you have a Post-Query (PQ) trigger that is populating items in your Form. This is the typical reason why you would see this message when you close your form and no User changes have been made. The best solution would be to move your non-base table items from your data blocks to a control block so the PQ trigger won't mark the block or record as "Changed".
    Hope this helps.
    Craig...

  • Gettins "Do you want to save the changes you have made" promt without any

    Hi all,
    Problem : I have a master detail relation between two blocks which are on different window ( say block 1 on window 1 is master and block 2 on window 2 is detail) ,
    when i open my window 2 and close it without any changes, then when i try to do any change in window 1 i get this popup message "Do you want to save the changes you have made".
    I have various non database items as well which are used to hold intemediate values like sum of a column and all.
    for the close button on window 2 logic :
         go_block('BLOCK1');
         hide_window('WINNDOW1');
    I dont want to change the message level. as if there are really changes made then we need this message.
    In another thread i saw this might be due to copy "value from property" created by master detail relation on the joined columns.
    Please suggest any solutions.
    Thanks in advance.

    HI I found the solution to this Problem:
    when we queried the data block then few items values were assigned . this changes the block_status to CHANGED as well as the form_status variable to CHANGED.
    so in EXIT logic of that window i cleared each block explicitly . this discards all the changes made to those blocks ( This logic was implemented for CANCEL button on my screen as so we need not save the data) while the SAVE logic already has the COMMIT so will not set the popup for that.
    Not a beautiful logic...... but works ...... :)

  • CS6/Yosemite: in Safari when opening a PDF and want to save the pop-up is english while the system language is german

    Hi,
    I installed end November last year on my new iMac the CS6 Master Collection. The language and country ist german. All menus and titles are correct. In Safari (8.0.2) PDFs are shown with Acrobat instead of the preview. When I want to save the PDF the pop-up window where to save the file is in english instead of german. How can I set it to be displayed in german?
    All menu-items are german, clicking the floppy-symbol will open the shown window. The list-items on the left side are in german but all labels, buttons and titles are english.

    If you are printing to physical printer from Safari : Use Reader print button from Reader toolbar
    If you want to save a PDF from Safari to your local : Use Reader Save button from the Reader toolbar.
    PS: if you have PDF in read mode the  hover the mouse at the bottom of the page and the floating Reader toolbar will appear.
    Please let me know if this solves your issue.

  • How to find the logged-in username

    Hello everyone,
    My application needs to find the logged-in username from the
    operating system, which in this case will always be Windows. This
    would be the same as the USERNAME environment variable that can be
    obtained from typing "set" from the command prompt. Anyone know how
    this can be done? Many thanks, --Bob

    Hi,
    There's no direct API for this, but you can try:
    var username:String = File.userDirectory.name;
    (Refer
    http://www.johncblandii.com/2008/09/air-tip-getting-logged-in-user.html))

Maybe you are looking for

  • CD/DVD Disc Drive Issues

    I'm having trouble with my CD/DVD disc drive.. it won't load a disc, CD nor DVD. I put it in the slot, but it doesn't catch and get pulled in. Has anyone experienced this problem and found a fix? I'm hoping that the motor isn't dead! Thanks, -Adam

  • How to manage media cache files in Premiere Pro CS5.5?

    I hope my question is not too complicated but I still haven't figured this one out. Here goes: Whenever I open a project in Premiere Pro, the media cache files used are always the same ones from a prior project. For example, if I open project ABC, th

  • For SU01 automatically addition of field extension with  "0" in child system

    Hi Ids and roles are created through CUA and then it is distributed in the child systems. However in one of the child system, the users are automatically assigned a value 0 in extension field of SU01. This is then not allowing the program RSEOUT01 to

  • My mac says , that the ichat av 2,1 can't be used on 10.4.4

    having troubles to get the av connection started , i decided to go to a apple site and have a look at ichat development . i found that there is ichat av 2,1 immediately downloaded it , but then i discovered that it's working just with OS 10.3 and not

  • Execute a command after 3 seconds...

    hey guys... there´s a way on AS to execute a command like.... menu2items.selectedIndex = 2; after some seconds? cya....