OIM API Code to change the link of the provisioned Account to another User

tcResultSet rset;
          HashMap <String, String> map;
          try{
               userIntf=(tcUserOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
               map = new HashMap <String, String>();
               map.put("Users.User ID",toUserLogin);
               map.put("Users.Status","Active");
               rset=userIntf.findUsers(map);
               // Get the User Key for the User given his User ID
               rset.goToRow(0);
               long toUserKey=rset.getLongValue("Users.Key");
               System.out.println(" Key for the ToUser is :" + toUserKey);
               map = new HashMap <String, String>();
               map.put("Users.User ID",fromUserLogin);
               map.put("Users.Status","Active");
               rset=userIntf.findUsers(map);
               // Get the User Key for the User given his User ID
               rset.goToRow(0);
               long fromUserKey=rset.getLongValue("Users.Key");
               System.out.println(" Key for the FromUser is :" + fromUserKey);           
               // Now get all the objects thats been provisioned for the user given user's Key
               rset=userIntf.getObjects(fromUserKey);           
               HashMap tmap = new HashMap();
               for(int k=0;k<rset.getTotalRowCount(); k++){
                    rset.goToRow(k);
                    System.out.println("####################################################");
                    String targetName=rset.getStringValue("Objects.Name");
                    System.out.println("targetName :: Objects.Name = "+targetName);
                    long objInstKey = rset.getLongValue("Users-Object Instance For User.Key");
                    System.out.println("Users-Object Instance For User.Key = "+objInstKey);                    
                    String status =rset.getStringValue("Objects.Object Status.Status");
                    System.out.println("Objects.Object Status.Status = "+status);
                    System.out.println("####################################################");
                    if(status.equalsIgnoreCase("Enabled")&& targetName.equalsIgnoreCase(resorceName) ) {
                         System.out.println("Changing to service Account..");
                         userIntf.changeToServiceAccount(objInstKey);
                         System.out.println("Account changed to service Account");
                         System.out.println("Linking Account to another User....");
                         userIntf.moveServiceAccount(objInstKey, toUserKey);
                         System.out.println("Account Linked");
                         System.out.println("Changing Account from service......");
                         userIntf.changeFromServiceAccount(objInstKey);
                         System.out.println("Account changed to normal");
          }catch(Exception exception){
               System.out.println("Exception occurred :"+exception.getMessage());
          }

HI rumesh,
    Don't use resource link as you did. Try using normal link and create a component(HTMLB or anyother) from KM reource content, then add that component to the link as below.
   comp = ....(should be a component from your Km content resource)
  Link link = new Link("Link");
  link.setTarget("www.yahoo.com");
  link.setReference("www.yahoo.com");                                        
  link.addComponent(comp);
finally add that link to your search UI . I hope this will help.
  I am sorry if i confused you.
Thanks & regards.
Rumeshbabu

Similar Messages

  • I have just bought an old ibook g3 and i need a code to change the region on the dvd drive . how can i get this ?, i have just bought an old ibook g3 and i need a code to change the region on the dvd drive . how can i get this ?

    i do not know the code to change the region on the dvd drive and it is stuck on region 1 and i need to change it to region 2. i am using an old ibook g3 , can any one help with the code

    You must have a G4 iBook as the G3 models can only install up to 10.4.11.
    Some links to read for possible help.
    https://discussions.apple.com/message/759882#759882
    https://discussions.apple.com/message/5083031#5083031
    https://discussions.apple.com/message/20461888#20461888

  • How do I unlock my iPhone with my IMEI code on iTunes. And how do I change the iCloud account connecting to the phone?

    My sister got the 5S, so she has given me her old 4S. She got the IMEI code from her network to allow me to unlock it. When I plug the phone into my computer, how do I use the IMEI code to unlock it on iTunes. The text my sis got from O2 says, "Apple have confirmed the iPhone IMEI 01.....etc. is set to unlock. To complete, connect the device to iTunes with a SIM never used in the iPhone". But I'm not sure what to do, I already connecting the iPhone with my SIM to iTunes... What next? Also how do I change the iCloud account connected to the phone (hers) to my own?
    Thanks.

    Please see your duplicate post below.
    https://discussions.apple.com/message/24231623#24231623

  • T-Code for changing the default Exchange Rate reference for creating PO?

    Dear All,
           Can somebody kindly give me the T-Code for changing the default
    Exchange Rate reference for creating PO? Is there a Step by Step
    procedure before changing the default exchange rate?
    Thank you in advance.
    Regards,
    Gopesh

    Hi
    There is not such Tcode to change the default exchange rate from the PO.
    If you want you can confugure the exchange rate in the following path in the IMG,
    SPRO>MM>LIV>Incoming Invoice>Configure How Exchange Rate Differences Are Treated
    Hope it helps you.
    Cheers
    Umakanth

  • How to change the reconciliation account in customer master record?

    hi friends,
    i created customer master with wrong reconsiliation account in XD01. i failed when i am trying to change that reconsiliation account in XD02. it was suppressed. how to change the reconcilition account in customer master data?

    Hi,
    Go to this path: Spro>Financial Accounting>Account Receivable & Account Payable>Customer Accounts>Master Data>Preparations for Creating Customer Master Data>Define Account Groups with Screen Layout (Customers)
    Double Click on Your Group, Then Click on Company code Data under Field Status, Then Double click on Account Management, That screen you will find the Reconcilation Account, Select Requred Entry.
    now it will coming Customer master.
    It's useful assigne points as a way to say Thanks
    Regards
    gvr

  • Changing the "Reconciliation Account" in the master data of a Customer

    Hi All,
    I've to change the "Reconciliation Account" in the master data of a Customer. But this fiel has been made not modifiable.
    Could anyone tell how change this?
    Thanks,
    Gandalf

    Hi,
    In SPRO, change the field status for the customer account group to optional. Then you can change the reconciliation account of the customer.
    The Path -
    SPRO>>Financial Accounting (New)>>Accounts Receivable and Accounts Payable>>Customer Accounts>>Master Data>> Preparations for Creating Customer Master Data>>Define Account Groups with Screen Layout (Customers). Here select the account group for the customer and double click on the line. In this screen, double click on Company code data. Then change the field status in Account management for Reconciliation account.
    Hope this helps.
    Thanks and Regards,
    Anit

  • Changing the recon account

    hi,
    i have an issue like to change the recon account in goods receipt transaction. right now the vendor is having (x  for domestic )recon account and  now he is purchasing the capital goods from the same vendor and in the system there is another recon account (Y for capital goods)
    so right now we want the goods receipt transaction to capital goods recon account
    please let me know the procedure

    Dear  Alapati Srinivas,
    You need to customize "Posting with alternative reconciliation account".
    The SPRO path is: Financial Accounting-> Accounts Receivable and Accounts Payable-> Business Transactions-> Postings with Alternative Reconciliation Account-> Define Alternative Reconciliation Accounts (or T-Code S_ALR_87002480).
    In there you have to define account Y as alternative reconciliation account for X.
    Also in both X and Y master records you need to flag "Recon. acct ready for input" check- box in the "Create/bank/interest" tab.
    After that when you try to post incoming invoice the system will allow you to choose between X and Y as reconciliation account.
    Regards,
    Milen.
    Edited by: Milen G on Sep 1, 2010 8:20 AM

  • Changing the Reconciliation Account to Regular (Non Reconciliation) GL

    Hi there,
    We are on SAP ECC6.0.
    We need to change the Master Record of a Reconciliation Account by making it a Regular (that is NON Reconciliation) Account.
    The system is allowing us in doing this in certain cases and in some we are given the Error as:
    Modifications to reconciliation account not permitted
    Error Message # FH110
    We have already zero out the balance outstanding in all Vendors linked to this GL Account.
    Thanks
    Bob

    Hello,
    It is not the question of making the balance to zero. Though you might have brought the balance to ZERO, but still they are showing as open items only in your system. Until and unless they are cleared, you cannot change.
    After posting number of entries in the system, now try to change the reconciliation account to non-reconciliation account will have its own disadvantages and may affect adversely on your reporting. It suggested not to make any further changes. Make a new reconciliation and assigned the same to new customers or vendors or change the reconciliation account in the customer or vendor masters.
    Try to run F.5D
    Please recheck your configuration in OBBW.
    Regards,
    Ravi

  • How do I change the iMac account registered with my Apple ID?

    I recently got a new iMac and signed in with my Apple ID. I want to change the iMac account that is linked with my Apple ID which was the first one I created the first time I started up my iMac. How do I do that?

    I'm using Lion, but the premise may be the same. I've already forgotten SL.
    In System Preferences click on Accounts. In Lion it's Users & Groups. You can look in there for something to do with Apple ID and password.
    Is that what you're looking for.

  • How do I change the itunes account apple id to match my other apple id

    Hi all, I had an itunes account in my name but was linked to kids ipods. Now got iphine so made kids own email and apple ids. The one i did for daughter seems to have all the icloud and itunes libary on it  I want to change the itunes account to my apple id but it wont let me. Im going in circles.

    Try
    Settings
    Messages
    Send and Receive
    Add all your email addresses and your iphone number
    Cheers

  • I just bought an iPhone 5 and I need to change the iCloud account so that I am not sharing the same account with my husbands iPhone. How do I do this?

    I just got a new iPhone 5 and I need to change the iCloud account because I am now sharing it with my husband and I can not restore or back up my phone because of it. I need help!

    here is a link that will help you: https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId

  • Changing the alternative account number

    Hi all,
    Is it possible to change once assigned alternative account number that has already been posted to?
    Thanks!!
    D.

    Hi,
    Please see the solution given by Brendan O'Brien for the thread "GL Alternative Acct Number - error message FH007" in this forum.
    Anyway, I am copying the text from the same thread. Hope this should be useful to you.
    If you have a "Country-specific chart of accounts" assigned to the GL Account then it is correct that you cannot change the alternative Account number.
    However if you do not have a "Country-specific chart of accounts" Assigned and yet you still cannot make this change
    See note 305203. This note will prevent this message where no "Country-specific chart of accounts" is assigned.
    If you do have a "Country-specific chart of accounts" assigned then unfortunately you cannot change this error message, as FH007 is hardcoded as an error.
    However, a possible workaround which you may like to try could be:
    Deassign the country chart of accounts from OBY6,the company code global settings. Then it is possible to enter an alternative account number on the G/L master record irrespective of whether there is a balance on the account or not. Once the alternative account number is saved, reassign the country chart of accounts to the company code.
    However, as displayed, your account balancee is infact zero.
    The note will prevent the error message FH 007 where no "Country-specific chart of accounts" has been assigned to the corresponding company code. However, in your case, it sounds like you have a "Country-specific chart of accounts" assigned to the company code. Hence the error message.
    I hope that this information helps.
    Thanks,
    Ravi

  • HT201303 How do I change the bank account details as I have changed banks

    How do I change the bank account details for my iPad as I have changed banks?

    If you are doing it on your iPad then try tapping on your id in Settings > iTunes & App Store and selecting 'View Apple ID' on the popup and login to your account - on your account's page there should be a payments link.
    Or on your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and again on your account's details page there should be a payment link. 

  • Change the vendor account

    I had made GR, but posted wrong entries, instead of doing one vendor account & i had made in other vendors account, this lot is passed by quality also that means it UD is also done.
    how to change the vendor account.
    Thanks and Regards

    Hi,
    Please reverse the GR and then delete the line item from PO.
    Create New PO with correct vendor code and then make GR.
    Once PO is saved you cant change the vendor account no. in PO.
    Regards,
    Umesh

  • How to change the groupType attribute of a user group object?

    I'm trying to change the "groupType" attribute, of a user group object, from 'Distribution' to 'Security' (and the group scope is set to 'Global').
    The CAD bit mask value needed would be: 0x80000002 (Decimal -2147483646).
    How to change/modify the "groupType" attribute for this user group object?
    Thanks,
    UD

    Attribute attr= new BasicAttribute("groupType", "-2147483646");
    items[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE, attr);
    ctx.modifyAttributes(dn, items);
    --does not work.
    javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 00002141: SvcErr: DSID-031A0B56, problem 5003 (WILL_NOT_PERFORM)
    Is it possible to modify it?
    Thanks,
    UD.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Error while displaying a page

    Hi techies.. I installed JDK and Tomcat in my Redhat linux and downloaded the Sap Java connector and installed it witout any problem. But the problem now is in one of the pages i'm establishing the connection for R/3 and while displating that page i

  • Listening multipe devices through TCP/IP Listener

    Hello How can I listen multiple devices at the same port on TCP/IP. for example there are 10 to 100 devices that sends their data each after 5 secs. How can I listen to all of them at once? I designed the logic but when I am trying to send the data t

  • Page Layout components : corporate branding image and copyright

    hi.... i am using R12 and my page consists of a table and the corporate branding image and copyright but because the table has many columns it spans along with the scroll but the problem is that the page layout line and copy right does not span with

  • Big ten newtwork

    why wasn't the penn state game on the big ten network as advertised?  it was on with comcast....hmmm this is the second time Verizon has chosen not to show the penn state game while comcast has.  what am I paying for?

  • Intel ProSET/Wir​eless - Windows 7 - Network System Icon Disappears

    I carefully removed the Intel ProSET/Wireless Vista software on my x200 and then did a Windows 7 upgrade install and finally reinstalled the W7 version of ProSET software.  Everything seems to work OK, including the WiFi software.  The only strange t