Current User in a BPA script

How can I get the current user in a BPA script?

try to invoke it from global variables, like per_id in user guide:
move $PER_ID to "schema/customerId";
somthing like this:
move $USER to ...;

Similar Messages

  • How to copy the International settings from current user to default user/welcome screen on Windows 8.1/ Server 2012R2 via PS script?

    Hi,
    I have to script the international settings in virtual machines which are Win Server 2012R2 or Win 8/8.1.
    For the current user, it's quite easy.
    new-WinUserLanguageList nl-BE
    set-WinUserLanguageList nl-BE
    Set-WinSystemLocale nl-BE
    set-Culture nl-BE
    But how can I copy these settings to the Default user/Welcome screen? I cannot find a solution for that. Even on the site of Microsoft,
    http://technet.microsoft.com/en-us/library/hh852115.aspx all CMDlets are only for the current user.
    Maybe I'm looking with the wrong keywords, but... With Powershell v4 it should be possible, isn't it?
    Thanks for looking together and hopefully we can find an answer.
    Kind reg,
    Dirk

    Questions like this would best be answered in the deployment forum.
    The default lock screen tracks the current user.  The system lock screen tracks the local system admin account.
    There is a SYSTEM profile which, I believe, can be set via registry.
    http://social.technet.microsoft.com/Forums/windows/en-US/20d36ce4-c948-4c68-a415-dda9e0665159/setting-default-ui-in-windows-8-or-81-using-dism-online-setuilangenus-gives-error?forum=w8itproinstall
    ¯\_(ツ)_/¯

  • How to switch user from the current user using shell script code

    Hi Experts,
    I have an requirement to login into a particular user from the shell script concurrent program. I do have credentials for that particular user. I want to login and run few commands from that particular user. Please let me know if there are any methods to login as a particular user using the username, password from shell script program.
    Thanks a lot.

    Thanks for your reply. However we cannot use su command from a shell script program. How to enter password from shell script program?http://tinyurl.com/3t7cwjh
    Thanks,
    Hussein

  • How to find out by MDX that the current users is member of a role - Default member issue

    Hi,
    just imagine you have a dimension with a few members (A, B, C...). I defined a role which gives some users only rights to "B". On the other hand the default member for the dimension is set to "A". Now users part of the role get an error
    that the member "A" is not found. So while
    https://msdn.microsoft.com/en-us/library/ms175626.aspx says the default member setting in the role "overrides" the overall default member this is not completely true because first the general default member is selected and after that the role
    specific one.
    So the solution might be that I explicitly define the default member in all roles. This might be possible but there is one issue: you can't define a role specific default member for users part of the adminstrator role. So all admins don't have a default
    member which is quite some restriction for some users...
    So the question is how to solve that problem. An idea would be that I use some MDX to determine the default member in the dimension based on the actual user's role membership. But how to do that? Or any better idea?
    Thanks,
    Thomas Pagel

    Hi Thomas,
    According to your description, you want to have a role-specific default member for different roles. Right?
    In Analysis Services, when granting access to dimension, a connection will fail if a role restricts access to a default measure. As you mentioned, the best solution is specify a default member for each role. But for administrator role(full control),
    it can't set the default member. All tabs except General and Membership are disabled. And the system can determines the default member of current user automatically. It's not supported to get the default member in MDX either.
    However, SSAS has additive design for role security. So in this scenario, we just need to create another role for those members of administrator role and specify a default member for this role. SSAS will take that role-specific default member
    for these users. And it will not effect the administration permission for them.
    Reference:
    Default members, MDX Scripts, Security, KPIs and Perspectives
    The Additive Design of SSAS Role Security
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How to add the current user to a people picker using javascript coding in document library

    Hi Everyone,
    This is my scenario,
    I have a document library,for this if any user uploads a document,there we have three content types(Ex:content1,content2,content3)
    if the uploaded user is from content 1(here we have four columns name,assigned to ,status,published to) after uploading the document the document has to be updated.so when the document is updated by the user then automatically the published filed people
    picker has to be filled up with the current user name this is done by using java script object model programming.
    i am stuck with this can anyone help me..............
    thanks in advance
    Ramu

    Hi,
    I understand that you want to set a people picker field value automatically to current user. You can use these ECMA scripts on your EditForm.aspx page. Edit the page in SharePoint designer and add the code before a </asp:Content> tag.
     <script type="text/javascript">
    var context = null;
     var web = null;
     var currentUser = null;
    ExecuteOrDelayUntilScriptLoaded(GetUserLoginName, "sp.js");
    function GetUserLoginName() {
    context = new SP.ClientContext.get_current();
     web = context.get_web();
     this._currentUser = web.get_currentUser();
     context.load(this._currentUser);
     context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod),
    Function.createDelegate(this, this.onFailureMethod));
     function onSuccessMethod(sender, args) {
     var today = new Date();
     alert('Name:' + this._currentUser.get_title() + '\n Login:' + this._currentUser.get_loginName()); document.getElementById('ctl00_m_g_9b4b3950_80d8_4e6e_b2fa_241b727d83d4_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').innerHTML=this._currentUser.get_title();//you
    need to change the ID here to you people picker field ID. You can get the id for this field with the help of IE developer tool.
     function onFaiureMethod(sender, args) {
     alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     </script>
    For more information, please refer to this site:
    Get current user’s LoginName Ecmascript Sharepoint 2010:
    http://www.learningsharepoint.com/2011/05/18/get-current-users-loginname-ecmascript-sharepoint-2010/
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • Microsoft Word Has Not Been Installed for the Current User

    Hi, everybody
    I'm just starting our attempt to put together ZfD app packages for MS Office 2007. I've tried 2 different route with poor results for each. I'm looking for guidance and suggestions and, hey really, the simple final solution. :)
    Objectives: Each app package will install locally one of the Office apps (e.g., Word) if it is not installed and then launch it, otherwise it will launch it. It gets installed locally to the C: drive using all the MS default choices, but runs from the desktop ZEN/NAL shortcut. All desktops are XP, not Vista or W7.
    Routes tried and failed...
    1) Simple app, uses distribution and run scripts to figure out if already installed, then installs using network shared drive and config.xml file for just the one app. The result ought to work -- no particular error in the package, those are fixed -- but what happens is something different each time with the MS setup.exe, and it never does complete without its own error (various and different each time). So, this appears to be completely unreliable because launching MS's setup.exe from a simple app is unpredictable and incomplete.
    2) Snapshot of a successful setup.exe and config.xml install. This ALMOST works... well it does in fact work but the snapshotted app gives an error once it finishes launching -- "Microsoft Word Has Not Been Installed for the Current User" -- and exits. From the research I've done on this message, the MS program sees the "wrong" Windows profile on the destination environment, compared to that in the snapshot, and figures it's now been installed from a bootleg copy of Office 2007.
    At this stage all I can think of is expletives. We've paid for everything, I've followed all the usual and customary steps, played by the rules, been polite (and also used the necessary computer swear words), and now I just want to insult everyone in Microsoft's marketing department for ruining everyone's life yet again. Can't we just do this, is it too much to ask!?!
    Please help me. What is really going to work for distributing and maintaining Office 2007 apps using our ZfD environment? ALL USEFUL SUGGESTIONS WELCOME. Thank you. Bless you.
    -Kent S.
    Be strong as a ship and wise as a whale

    These questions are really best in the Microsoft Office Forums.
    These are MS Office Questions not ZEN Questions.
    Novell did not design Microsoft's Office Install.
    I have nothing against snapshots, but it does not work great with the Office
    installs, which you yourself know since you are posting here with problems
    based on that.
    And your other method you are trying with the break out is not working well.
    We also know that from experience.
    We can tell you that the way most people install it and the way most people
    succeed doing it, is by doing it the way recommended and designed by
    Microsoft.
    ZEN does that just fine.
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.
    "KentFSmith" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Thank you, Grimlock (-Grimlock?-)
    >
    > Through a google search I encountered a very close suggestion, and the
    > poster said they couldn't remember the name of a MS utility but that
    > there was one that would break out the individual MSIs from the Office
    > 2007 setup.exe bundle. The dependent app appears to be a simple and
    > possibly elegant solution, but without a good way to break out the MSIs
    > I don't see how to do anything other than with a config.xml ('Config.xml
    > file in the 2007 Office system'
    > (http://technet.microsoft.com/en-us/l.../cc179195.aspx)).
    >
    > Do you know of that utility and where I can find it?
    >
    > There is a lot of history here now of just doing the individual
    > applications. Everyone gets Word and Excel, but much fewer get
    > PowerPoint and Access. All other reasons aside, a compelling one is the
    > reduced number of help calls to the Help Desk here. Occasionally we
    > also just run the whole Office install for someone who needs some of the
    > odd utilities, but that is easily cost-justifiable for us to break them
    > out as exceptions. Otherwise, we focus 90% of our support on just Word
    > and Excel and it pays off nicely.
    >
    > If we switch to putting full Office 2007 on all PCs then there may be a
    > better approach that include other tools than ZfD, such as the fact that
    > we replace 1/3 of all PCs in the organization each year (so that no
    > hardware is more than 3 years "behind"). We could put 1/3 of all Office
    > 2007 installs into the new PC image. But we still need to support all
    > the use of the apps after the install, so ZfD MUST work well, it simply
    > MUST work well or we're screwed, to use the vernacular. Also, just
    > switching from what we've been doing for years -- single app orientation
    > -- means introducing new-ish issues that have to discover and explain to
    > our comrades, and to adjust our orientation with unknown future costs.
    >
    > But that may end up being the simplest adequate solution. And that's
    > what I want.
    >
    > -K
    >
    > grimlock;1883526 Wrote:
    >> Craig Wilson wrote:
    >> > You should really focus on #1.
    >> > Snapshot is not the way to go.
    >> >
    >> > Details about what is Not working or what random behavior may help
    >> folks.
    >> > Ask in the MS forums may help too. dont' mention zenworks.
    >> > Just say you are installing as Administrator from a share and getting
    >> these
    >> > errors.
    >> >
    >> > While not 100% accurate, it should be good enough to get some good
    >> feedback.
    >> >
    >>
    >> Nor is installing 1 app at a time. Install the whole suite, have an
    >> icon for each app that runs the exe for that app with a dependency on
    >> the another app that points to the installer msi.
    >>
    >> If any user runs any app, it will run if the executable is there
    >> (meaning it's been installed). If the executable is not there then it
    >> calls the dependent application (the installer app) and installs it,
    >> and
    >> then runs it.
    >
    >
    > --
    > KentFSmith
    > ------------------------------------------------------------------------
    > KentFSmith's Profile: http://forums.novell.com/member.php?userid=2927
    > View this thread: http://forums.novell.com/showthread.php?t=391573
    >
    >

  • Using to pass the current user while creating a procedure

    I have a .sql script that several people use to help set-up test beds but some users call the test procedures from a separate schema. The .sql creates a table (TABLE_A) and then a procedure that when run will create a trigger on a separate table (TABLE_B) that basically writes all info to TABLE_A. The problem is that if the .sql is run under schema SCOTT and then the procedure is run from schema JOE to create a trigger on JOE.TABLE_B, the trigger will try to write copy info to just TABLE_A instead of SCOTT.TABLE_A. My plan is to add a new input variable to the procedure for the schema where the procedure is located and set the default to the schema of the user running the .sql.
    I can't seem to figure out how to call the current user and then pass it to a procedure as a DEFAULT input variable. Any help would be greatly appreciated.

    OK, sadly, that did not work. What that provided to me was user that runs the procedure. If I run it as SCOTT it gives me SCOTT, but if I run as JOE, it gives me JOE.
    I created an example of what I am trying to do (it is all run in a .sql file). Let me know if this is a bad example....
    CREATE TABLE TABLE_A (
    tranid VARCHAR2(20) Primary Key,
    db_user varchar2(100) not null,
         old_val varchar2(100) not null,
    create or replace PROCEDURE TestBuild(OWN2 IN VARCHAR2, TNAME2 IN VARCHAR2, LOC2 IN VARCHAR2) IS
    OWN VARCHAR2(30);
    TNAME VARCHAR2(30);
    FNAME VARCHAR2(62);
    UNAME VARCHAR2(62);
    COL VARCHAR2(30);
    ST CHAR;
    CONS VARCHAR2(30);
    BEGIN
    OWN := UPPER(OWN2);
    TNAME := UPPER(TNAME2);
    FNAME := OWN||'.'||TNAME;
    UNAME := OWN||'_'||TNAME;
    FILE := SYS.UTL_FILE.FOPEN(LOC2,'TEST_Trig_'||UNAME||'.sql','w');
    SYS.UTL_FILE.PUT_LINE(FILE,'-- Test trigger start');
    SYS.UTL_FILE.PUT_LINE(FILE,'-- generated '||SYSDATE);
    SYS.UTL_FILE.NEW_LINE(FILE,1);
    -- The following trigger fires for EVERY row of each statement for
    -- the specified table.
    SYS.UTL_FILE.PUT_LINE(FILE,'CREATE OR REPLACE TRIGGER Test_trig_'||UNAME||' AFTER INSERT OR UPDATE OR DELETE ON '||FNAME||' ');
    SYS.UTL_FILE.PUT_LINE(FILE,' REFERENCING NEW as n OLD as o FOR EACH ROW');
    SYS.UTL_FILE.PUT_LINE(FILE,' DECLARE');
    SYS.UTL_FILE.PUT_LINE(FILE,' dmltype CHAR(1);');
    SYS.UTL_FILE.PUT_LINE(FILE,' tpid VARCHAR2(30);');
    SYS.UTL_FILE.PUT_LINE(FILE,' BEGIN');
    SYS.UTL_FILE.PUT_LINE(FILE,' tpid := SYS.DBMS_TRANSACTION.LOCAL_TRANSACTION_ID();');
    SYS.UTL_FILE.PUT_LINE(FILE,' IF INSERTING THEN dmltype := ''I'';');
    SYS.UTL_FILE.PUT_LINE(FILE,' ELSIF UPDATING THEN dmltype := ''U'';');
    SYS.UTL_FILE.PUT_LINE(FILE,' ELSIF DELETING THEN dmltype := ''D'';');
    SYS.UTL_FILE.PUT_LINE(FILE,' END IF;');
    SYS.UTL_FILE.PUT_LINE(FILE,' BEGIN');
    SYS.UTL_FILE.PUT_LINE(FILE,' INSERT INTO TABLE_A VALUES (tpid,User,:o.col1);');
    SYS.UTL_FILE.PUT_LINE(FILE,' END IF;');
    SYS.UTL_FILE.PUT_LINE(FILE,' EXCEPTION WHEN already_there THEN NULL;');
    SYS.UTL_FILE.PUT_LINE(FILE,' END;');
    SYS.UTL_FILE.PUT_LINE(FILE,' END;');
    SYS.UTL_FILE.PUT_LINE(FILE,'/');
    SYS.UTL_FILE.PUT_LINE(FILE,'show errors');
    SYS.UTL_FILE.NEW_LINE(FILE,1);
    SYS.UTL_FILE.FCLOSE_ALL;
    dbms_output.put_line('Script for table ['||FNAME||'] created. Now run it in sqlplus. ');
    END;

  • Set "peoples or groups" field with current user "login name" in sharepoint list form using javascript

    hi friends
    i am trying to set peoples or groups field in sharepoint  list form with current user login name
    here my code
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    $(document).ready(function NewItemView () {
    var currentUser;
        if (SP.ClientContext != null) {
          SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
        else {
          SP.SOD.executeFunc('sp.js', null, getCurrentUser);
        function getCurrentUser() {
          var context = new SP.ClientContext.get_current();
          var web = context.get_web();
          currentUser = web.get_currentUser();
          context.load(currentUser);
          context.executeQueryAsync(onSuccessMethod, onRequestFail);
        function onSuccessMethod(sender, args) {
          var account = currentUser.get_loginName();
          var accountEmail = currentUser.get_email();
          var currentUserAccount = account.substring(account.indexOf("|") + 1);
        SetAndResolvePeoplePicker("requester",account);
    // This function runs if the executeQueryAsync call fails.
        function onRequestFail(sender, args) {
          alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     function SetAndResolvePeoplePicker(fieldName, userAccountName) {
       var controlName = fieldName;
        var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
        var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
        var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
        peoplePickerEditor.val(userAccountName);
        spPeoplePicker.AddUnresolvedUserFromEditor(true);
    </script>
    but it is not working
    please help me

    Hi,
    According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
    To set "peoples or groups" field with current user "login name”,  you can use the below code:
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    function SetPickerValue(pickerid, key, dispval) {
    var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
    xml = xml + PreparePickerEntityXml(key, dispval);
    xml = xml + '</Entities>';
    EntityEditorCallback(xml, pickerid, true);
    function PreparePickerEntityXml(key, dispval) {
    return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
    function GetCurrentUserAndInsertIntoUserField() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
    Function.createDelegate(this, this.onFailure));
    function onSuccess(sender, args) {
    SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
    this._currentUser.get_title());
    function onFaiure(sender, args) {
    alert(args.get_message() + ' ' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
    </script>
    More information:
    http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Can you set default values for person/group picker fields? To current user?

    Two-part question/issue . . .
    Part 1:
    In InfoPath 2013 in use with SharePoint 2013, how do you set a Default Value for Person/Group Picker fields? Other field types like Text Boxes have a Default Value section in the Data tab of Properties.  There doesn't appear to be any equivalent for
    the Person/Group Picker field type in Properties.  I'd like to set a default person for a few fields in a form I've created.  Is this possible?
    Part 2:
    The default user I want to set for one of those Person/Group fields is the "current user."  I want a user to log into our SharePoint 2013 intranet, load a new form for edit/creation, and have one of the Person/Group fields in that form to
    automatically populate this particular user.  Is this possible?

    Hi Stephen,
    You can auto populate your InfoPath farm with current user Name and all other property that you have in your User profile, you have couple of options.
    First you can make a secondary connection in your InfoPath form with user profile and can use the UserProfileService.asmx and call the GetUserProfileByName method. Here is the steps you can follow.
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx
    Secondly you can use JQuery and SPServices ,
    $().SPServices.SPGetCurrentUser function to populate the values with script to achieve the same in this case you no need to use InfoPath form just create simple text type column in SharePoint
    list and auto populate it with getting the current user Name from User Profile here is the scripts
    <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.4.min.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
      var userCurrentName = $().SPServices.SPGetCurrentUser({
        fieldName: "CurrentUser"
      $("input[Title='CurrentUser']").val(userCurrentName);
      var userPhone = $().SPServices.SPGetCurrentUser({
        fieldName: "WorkPhone"
      $("input[Title='Phone']").val(userPhone);
    </script>
    Krishana Kumar http://www.mosstechnet-kk.com

  • Set Default Value for People Picker in List Template current user

    Hi,
    I have field definition in my custom list
      <Field ID="{26763808-64BB-4A3C-93A0-ED45AF783D45}"  Type="User" Name="RequestedBy" DisplayName="Requested By" Required="FALSE" ></Field>
    I need to set default current user in this.
    I found few options with javascript.
    Thanks in Advance.
    Where I can find on set of default commands like Today
    Hari

    Hi,
    Default current user can’t be got in calculated column like Today. I suggest that use SPD Workflow described above or JavaScript. Open NewForm page of the list, then add “pageview=shared&toolpaneview=2”
    to the page URL, click Enter to go to edit mode. Then add a Content Editor Web Part to the bottom of NewForm page, copy the code bellow into Source Editor of CEWP.   
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" src="http://come:100/sites/collection1/Shared Documents/jquery.SPServices-0.7.0.js"></script>
    <script type="text/javascript">    
    $(document).ready(function(){
    var CurrUser=$().SPServices.SPGetCurrentUser({
    fieldName: "Name", debug: false});
    $('#ctl00_m_g_dab5800a_09ac_4f35_97f6_9b5496127f68_ctl00_ctl04_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').html(CurrUser);
    </script>
    Note:
    download jquery.SPServices-0.7.0.js here and upload it to your own site:
    http://spservices.codeplex.com/SourceControl/list/changesets, and then replace the route of jquery.SPServices-0.7.0.js above with the route in your site. ctl00_m_g_dab5800a_09ac_4f35_97f6_9b5496127f68_ctl00_ctl04_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv
    is the id of the people-picker, please find it in your own NewForm page.
    Another method, you can use Event Handler. Here is the example code.
    public
    override void ItemAdded(SPItemEventProperties properties)
    if (properties.ListTitle == "listname")//replace listname with your list.
    SPWebcurrentWeb = properties.OpenWeb();
    SPUseruser = currentWeb.SiteUsers.GetByID(properties.CurrentUserId);
    SPListItemliitem = properties.ListItem;
    SPFieldUserValuefieldUser =
    newSPFieldUserValue(currentWeb, user.ID, user.LoginName);
          liitem["currentuser"] = fieldUser;//replace currentuser with your field name.    
          liitem.Update();
    //base.ItemAdded(properties);
    If anything unclear, please feel free to ask.
    Thanks.
    Emir Liu
    TechNet Community Support

  • How to reference the current user ID in an URL  iView

    Hi
      I have created an iview based on URL iview.
      I need to pass the logged on portal user id as parameter to a url.We are using EP6 SP2.
    Can any body help me in this regard.
    Regards
    Sayantan

    Hi SAYANTAN,
    You can create a dynpage that takes the current user id, use it to construct the url,
    and redirects to that url in doProcessBeforeOutput():
    public void doProcessBeforeOutput() throws PageException {
       Form myForm = this.getForm();
       IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();     
       IUser currUser = (IUser)request.getUser().getUser();
       String userid = currUser.getId();
       String url = "http://myUrl.com?userid="+userid;
       myForm.addRawText("<script>");
       myForm.addRawText("open(""+url+"","_self");");
       myForm.addRawText("</script>");      
    Hope that helps,
    Yoav.

  • RTC-5230 - Location DEV_LOC has not been registered by the current user

    All,
    We have recently migrated our dev environment to new hardware and I need to change the OWB Location details to reflect this - I am now attempting to unregister the locations in the Control Center but am getting the following error:
    RTC-5230: Location DEV_LOC has not been registered by the current user
    Is there a view I can use to find out which user registered the Location?

    Look at this thread (steps for unregsitering location)
    Re: Unable to connect control center and start runtime service
    Regards,
    Oleg
    PS. Before using unregister_location.sql script unregister this location in Warehouse Builder Browser (Locations Report section).
    This prevent from displaying error "Location ... is registered in this repository" during execution this script

  • Query to get objects list for which the current user has 'SELECT' privilege

    Hi,
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views. The privilege information for the current user is scattered in more than one system views. I have following system views
    USER_TAB_PRIVS_RECD - Object grants for which the current user is the grantee
    ROLE_TAB_PRIVS - describes table privileges granted to roles. Information is provided only about roles to which the user has access.
    If the object privilege is granted explicitly like "GRANT ALL ON TABLE_NAME TO "USERNAME" then this privilege entry goes to USER_TAB_PRIVIS_RECD
    If the object privilege is granted by ROLE. Role is created with certain object privileges. this role is assigned to user "GRANT ROLE_NAME TO "USERNAME"", then this entry goes to ROLE_TAB_PRIVS
    From these findings, I have composed below query
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT')
    Have I got user's all prvilege details? should I look some other system views?
    How to exclude system table privileges details?
    (SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT' AND OWNER NOT IN ('SYS','SYSTEM') Is this right?
    What about Public role in Oracle? Should I consider public role here?
    Oracel Version :11g
    I want make this query to work on Oracle 8i or above version
    Thanks

    >
    I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views.
    >
    You will need a hierarchical query to do that.
    Try this script for Listing privileges recursively for Oracle users
    http://www.adp-gmbh.ch/ora/misc/recursively_list_privilege.html

  • Powershell: Add registry value based on current user

    I would like to automate a network printer install that uses secure print. I can push the actual install out through group policy, but I need script that will assign each persons unique ID number to the printer settings. 
    Get current user name
    Check that user name against a spreadsheet or .txt file list. This list would have hundreds of unique user names in column A, and a unique ID number in column B.
    Example:
    Column A (username)               Column B (ID Number)
    User 1 
          123456
    User 2
          789101
    Write the ID number in column B to a specific registry value.
    Any idea's??

    You would use New-ItemProperty or Set-ItemProperty to write a registry value. New-* will allow you to set the value type (you can use -Force if it already exists). Here's an example of using Set-*:
    # Set a value named 'ValueName' in the key stored in $RegPath to 'ValueGoesHere'
    Set-ItemProperty -Path $RegPath -Name ValueName -Value ValueGoesHere
    If you need to get a value, you can use Get-ItemProperty:
    # Get all values for the Windows Update service's key:
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\wuauserv
    # Just get the start value (returned as an object with start and extra PS properties):
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\wuauserv -Name Start
    # Just get the start value (just the value):
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\wuauserv | select -exp Start
    (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\wuauserv).Start

  • How to get current user in Exchange 2007 OWA customization page?

    Hi,all
    I customize an ASPX page(smsconfig.aspx) in Exchange 2007 OWA( this file in ..\Exchange\ClientAccess\OWA\smsconfig.aspx, I don't modify registry.xml & web.config).
    My Exchange 2007 OWA has been configurated with Forms-Based Auth.
    https://mail.myexchange.com/owa/smsconfig.aspx The page works fine, but it cannot get current logon user with HttpContext.Current.User.Identity or
    UserContext.MailboxIdentity or UserContext.LogonIdentity
    <%@ Page language="c#" AutoEventWireup="false" Inherits="Microsoft.Exchange.Clients.Owa.Core.OwaPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Import namespace="Microsoft.Exchange.Clients"%>
    <%@ Import namespace="Microsoft.Exchange.Clients.Owa.Core"%>
    <%@ Import namespace="Microsoft.Exchange.Clients.Owa.Premium"%>
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.SqlClient" %>
    <%@ Import Namespace="System.Xml" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="System.Text" %>
    <script runat="server">
    。。。(my codes in here)
    </script>
    thanks for your help.
    Your Passion.My Potential.

    Microsoft.Exchange.Clients.Owa.Core.OwaContext.Current.UserContext.LogonIdentity.PrimarySmtpAddress
    Высказанное мною здесь - мои личные взгляды, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий.

Maybe you are looking for