Change of Status is not working in WebUI

Hello All,
Iam facing a problem in changing the status of the item in web UI requirement as follows.
We need to set the item status from the To be Closed to Close.The status To be closed is set by an contract processor and schedules the Action .i.e Close item Once the contract approver execuets the action.It need to be change to Closed and the item end date need to be set to the date when the Action is execueted
I have done my coding in the Execute method for the action Close item by using the FM CRM_ORDER_MAINTAIN
to change the item enddate and CRM_STATUS_CHANGE_EXTERN to change the Status to Closed and the Commit Work .My code is working fine in GUI but this is not working in WebUI . I can only see it when i execute the action go to the edit mode.
Can any one help me out in this regards.
Thanks in Advance.
Regards,
Kiran Posanapalli.
Edited by: posanapalli kiran on Feb 15, 2010 7:16 PM

Hi Kiran,
we're having the same issue that an opportunity is updated in the normal Gui but not in the WebUI when using FM CRM_ORDER_MAINTAIN.
What coding did you use for fixing this?
Kind regards,
Roy Willems

Similar Messages

  • My newly changed apple password is not working on my MacBook to help me change my password to log on?

    I just need help changing my password on my MacBook to log in. But my log in password and newly changed apple password are not working. Can I reset it or change the password another way or get a list of past password to try if those might be what the Mac thinks is my password still?

    You can reset it.
    For Snow Leopard and previous.
    http://support.apple.com/kb/ht1274
    For Lion and later.
    https://discussions.apple.com/docs/DOC-4101

  • How to save bloger password in firefox 3.6.6 ? common ways at internet such as changing nsLoginManager.js is not working because the notepad cant save the new file.

    how to save bloger password in firefox 3.6.6 ?
    common ways at internet such as changing nsLoginManager.js is not working because the notepad cant save the new file.
    == URL of affected sites ==
    http://blogger.com

    Some sites like PayPal, Yahoo, Windows Live and bank sites use ''autocomplete="off"'' to prevent Firefox from saving the name and the password.
    If a site uses ''autocomplete="off"'' then look at this article for a bookmarklet to remove that autocomplete attribute.
    http://kb.mozillazine.org/User_name_and_password_not_remembered (bookmarklet)
    http://kb.mozillazine.org/Password_Manager
    See also http://en.wikipedia.org/wiki/Bookmarklet

  • HT201303 Someone uses my apple ID to purchase, I have changed my password but not work . How can I disassociate my bank account with my APPLE ID?

    Someone uses my apple ID to purchase, I have changed my password but not work . How can I disassociate my bank account with my APPLE ID?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
     Cheers, Tom

  • Why does the address/status bar not work?

    After updating to 9.0.1, my status bar will not work, or my address bar. If I try to type in anything and press enter into the address bar, nothing happens. Also, I cannot press forward or back as they always remain grayed out. The only way I can get to a website is by pressing home, which is thankfully google. I have to google the url to go to it.
    Remembering now actually, I copied all the folders from the main firefox folder and pasted them into a new install of firefox (I had this problem actually before firefox updated). I was hoping that copying these folders would save my addons and etc. after I downloaded a new firefox and re-installed it. I put the folders back and firefox is still messed up :/
    I just want it to work more Q_Q

    That issue can be caused by an extension that isn't working properly.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • SP2010 Designer workflow "Set Content Approval Status" does not work

    Hello
    I'm having a problem with a workflow for one of my clients.It is a SharePoint 2010 environment and I can only use SharePoint 2010 designer (no visual studio).
    We have an approval workflow in place, which works great. After the document approval workflow has does its thing, a new workflow can be launged by specific users (they have writing rights and can approve content). The workflow is used to set the release
    date of the document. This can only be determined after content approval.
    However, when the release date is set, the document approval status is changed to concept. This is of course to be expected, as we changed to document metadata. That is why I wanted to add the action "Set content approval" to this workflow. I cannot
    seem to get this action to work. Right now the workflow does the following:
    check out the document (check out is obligatory in our library)
    set the release date field to the released date parameter (defined when starting the workflow)
    check in the document
    set content approval to approved.
    The release date gets set to the parameter value, but the document is not checked in and the content approval status is not set. SharePoint produces the following error message (translated from Dutch): "An error occured. Cannot edit the item, possibly
    because one or more columns require another type of content. Unknown error."
    Guided by other posts online I gathered that this might be because the actions checkin and set content approval occur to close together. I tried letting the workflow pause for the duration of 1 minute after checking in, but this pauses the workflow indefinitely.
    I then tried 5 minutes (as this is the time standard set by SP2010 designer) but this also resulted in indefinite pausing.
    Posts online lead me to believe that I'm not the only suffering from this problem, but as of yet, I haven't been able to find a solution that works for me. Hopefully someone can help me.

    Hi,
    According to your post, my understanding is that the "Set Content Approval Status" didn’t work in SharePoint 2010 Designer workflow.
    I try to reproduce the issue and the result is the same as yours.
    If I only check out and check in the item, the workflow works well.
    However, once I set Content Approval Status after checking in the item, the workflow get error.
    As a workaround, I recommend to use two workflow to achieve what you want.
    First, create the first workflow, and allow the workflow to be manually started.
    Then, create the second workflow, and
    start the workflow automatically when an item is changed.
    When you start the first workflow, the document will be set value of the release date. And then the second workflow will be started automatically to set the content approval status.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Pro 9500 mark 2 status monitor not working

    My status monitor stopped working on my 9500 mark2.I uninstalled driver and software and reinstalled,no luck.Changed usb cable and usb port.Printer is still working but status monitor can not commuicate with printer. 
     Thanks
    MIKE

    Hi, Mike!
    So that the Community can help you better, we will need to know exactly which operating system is running on your computer. That, and any other details you'd like to give will help the Community better understand your issue!
    If this is a time-sensitive matter, our US-based technical support team is standing by, ready to help 24/7 via Email at http://bit.ly/EmailCanon or by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
    Thanks and have a great day!

  • User status does not work for campaign automation

    Hi,
    We have 5  user status in our campaign. When we select the campaign automation option,   the user status appears but when we try to change from a status to another (sample: Open to Planificado) the next error appears:
    Diagnosis
    System error: An invalid transaction ID was used to check whether or not a business transaction is allowed.  Transaction %%%% does not exist.
    System Response
    You cannot carry out the requested function for object Campaign.
    Procedure
    Please contact your system administrator.
    We include the option release in each user status and everything works fine, however, we require that release status (system estatus) only appears in the latest  user status
    I hope someone help me
    Thanks,

    The error was resolved by applying the following note  1513934 - transaction %%% does not exist

  • Sharepoint Designer - Two step List Workflow task item is not changing the status from not started to Complete

    Hi 
    Using SPD i am creating list workflow.
    Scenario: Employee submits a request . Task assign to manager. Manager can either approve/ reject. If approve then change the state column to "done". If rejected the state column to "Rejected".
    Problem is "Assign a to do item" is assigning the task to manager. But after manager approves the status in the task list not changed to "Completed". Still it is showing "Not started". I dont want to manually complete the task.
    Please help me for automatic process. 
    What i should do to change the status to "Complete" automatically after manager approval
    Regards
    Jhanani
    Janani.R

    Hi Janani,
    From your description, you would like to create an approval workflow for a list. When an employee submit a request to the list, an approval task should be assigned to manager, then manager could approve or reject the request. From the request list,
    we should be able to see the Approval task’s status.
    Not understand the reason of designing the workflow to two steps, an approval action should be enough from my understanding. For producing, I create a list named Request list, then customize it in InfoPath form to add a Request field for stating request
    content. Then add a workflow to list named Approval task, add the action of Start an approval process with administrator and make the workflow automatically start when item is added.
    The image below shows the status of Adding items, Approving and Rejecting. Please check if it could meet your requirement.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Auto-Submit On Change in DropDown List not working properly!

    Hi all,
    I�ve got a problem with a drop down list an a table with some rows on my page. The property "Auto-Submit on Change" is set for the drop down because the valueChange-method has to do some work when the user selects another value from the drop down.
    The problem is that after selecting another item from the drop down, the table fields don�t keep their values, which I had entered before I selected another item in the drop down. But: When I select an item again, suddenly exactly these values are set.
    Here my code:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <ui:page binding="#{Page1.page1}" id="page1">
    <ui:html binding="#{Page1.html1}" id="html1">
    <ui:head binding="#{Page1.head1}" id="head1">
    <ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
    </ui:head>
    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{Page1.form1}" id="form1">
    <ui:table binding="#{Page1.table1}" id="table1" style="height: 488px; left: 24px; top: 120px; position: absolute; width: 1376px"
    title="Table" width="1376">
    <ui:tableRowGroup binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10" sourceData="#{SessionBean1.columnProvider}" sourceVar="currentRow">
    <ui:tableColumn binding="#{Page1.tableColumn1}" headerText="field1" id="tableColumn1" sort="field1">
    <ui:textField binding="#{Page1.textField1}" id="textField1" text="#{currentRow.value['field1']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{Page1.tableColumn2}" headerText="field2" id="tableColumn2" sort="field2">
    <ui:textField binding="#{Page1.textField2}" id="textField2" text="#{currentRow.value['field2']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{Page1.tableColumn3}" headerText="field3" id="tableColumn3" sort="field3">
    <ui:textField binding="#{Page1.textField3}" id="textField3" text="#{currentRow.value['field3']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{Page1.tableColumn4}" headerText="field4" id="tableColumn4" sort="field4">
    <ui:textField binding="#{Page1.textField4}" id="textField4" text="#{currentRow.value['field4']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{Page1.tableColumn5}" headerText="field5" id="tableColumn5" sort="field5">
    <ui:textField binding="#{Page1.textField5}" id="textField5" text="#{currentRow.value['field5']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{Page1.tableColumn6}" headerText="field6" id="tableColumn6" sort="field6">
    <ui:textField binding="#{Page1.textField6}" id="textField6" text="#{currentRow.value['field6']}"/>
    </ui:tableColumn>
    </ui:tableRowGroup>
    </ui:table>
    <ui:dropDown binding="#{Page1.dropDown1}" id="dropDown1" items="#{Page1.dropDown1DefaultOptions.options}"
    onChange="common_timeoutSubmitForm(this.form, 'dropDown1');"
    style="position: absolute; left: 48px; top: 24px; width: 240px; height: 24px" valueChangeListener="#{Page1.dropDown1_processValueChange}"/>
    </ui:form>
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    </jsp:root>
    and the code of the valueChange-Method:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    getSessionBean1().getColumnProvider().commitChanges();
    List positions = getSessionBean1().getColumnProvider().getColumnList();
    Is there some explanation for this behavior or it�s really a bug in the way how the drop down is submitting the form? I would understand it when commitChanges is not working here because of auto submit on change (==immediate?). but once it works und once it doesn�t work!

    Hi There,
    Not sure what you mean. Have you tried Netbeans 6 yet. Do you see same behaviour in it as well?
    This might be of help to you
    http://www.netbeans.org/kb/55/dropdowncomp.html
    Thanks
    K

  • Illustrator CC Type "Change Case" keyboard shortcut not working

    In Illustrator CS6 I established a keyboard shortcut of Alt+Shift+Ctrl+= to the command Type-->Change Case-->UPPERCASE (and Alt+Shift+Ctrl+- to Type-->Change Case-->Title Case). In Illustrator CC, these two keyboard shortcuts are not working. They are displaying in the Type menu correctly, and the menu commands themselves work correctly, but the shortcuts do not work. Any ideas?

    Well, as I stated, the = worked fine in CS6 on Windows. I just tried to changing it to Alt+Shift+Ctrl+U and that one does work correctly. I would prefer that Adobe minimizes functionality regressions in new releases, even if there are conceivably workarounds that I could employ.
    Would somebody be willing to try Alt+Shift+Ctrl+= on a PC and see if they can get it to work on their system?

  • Equipmen dismantle, change plant, install does not work

    Hello experts,
    I have developed a function module which should execute the following steps:
    - dismantle an equipment from a functional location
    - change the plant of the equipment
    - install the equipment into a new functional location
    I therefor tried to use these three existing function modules:
    - Dismantle -> EQUIPMENT_DISMANTLE
    - Change Plant -> BAPI_EQUI_CHANGE
    - Install -> EQUIPMENT_INSTALL
    Now the problem occurs that the call of the BAPI_EQUI_CHANGE does not execute a commit so the changes are not directly written to the database and the following call of EQUIPMENT_INSTALL is not able to install the equipment into the new functional location.
    I tried to execute a BAPI_TRANSACTION_COMMIT after the BAPI_EQUI_CHANGE but still it does not work. In my dev system I can insert a "WAIT UP TO 1 SECONDS." call which work but this does not work in the testing env. Also this is a very bad approach.
    The curious thing is that everytime I debug my FM everything is working fine. So I bet there is a problem in the direct following call after the BAPI_EQUI_CHANGE and EQIPMENT_INSTALL.
    Here are the relevant calls:
    CALL FUNCTION 'EQUIPMENT_DISMANTLE'
        EXPORTING
    *     READ_SOBJ             = 'X'
    *     READ_ROBJ             = 'X'
    *     LOCK_SOBJ             = 'X'
    *     I_DATE                = SY-DATUM
    *     I_TIME                = SY-UZEIT
          i_inherit_flags       = p_i_inheritance_flags
          old_sequi             = p_i_ls_equi
    *     EXEC_MEAS             = ' '
          transmit_new          = 'X'
          direct_new            = 'X'
          commit_new            = 'S'
        CHANGING
          s_equi                = p_i_ls_equi
    *     R_EQUI                =
    *     R_IFLO                =
        EXCEPTIONS
          err_dismantle         = 1
          OTHERS                = 2
      p_rc = sy-subrc.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = 'X'
          IMPORTING
            return = bapiret2.
      ENDIF.
      itob-maintplant   = p_target_swerk.
      itob-planplant    = p_target_iwerk.
      itobx-maintplant  = 'X'.
      itobx-planplant   = 'X'.
      CALL FUNCTION 'BAPI_EQUI_CHANGE'
        EXPORTING
          equipment               = p_ls_equi-equnr
          data_general            = itob
          data_generalx           = itobx
          data_specific           = itob_eq
          data_specificx          = itob_eqx
    *     VALID_DATE              = SY-DATUM
    *     VALID_TIME              = SY-UZEIT
        IMPORTING
    *     DATA_GENERAL_EXP        =
    *     DATA_SPECIFIC_EXP       =
          return                  = bapiret2
      IF bapiret2 IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = 'X'
          IMPORTING
            return = bapiret2.
      ENDIF.
      CALL FUNCTION 'EQUIPMENT_INSTALL'
        EXPORTING
          read_sobj             = 'X'
    *     READ_ROBJ             = 'X'
    *     LOCK_SOBJ             = 'X'
    *     POSEQUI               =
    *     I_DATE                = SY-DATUM
    *     I_TIME                = SY-UZEIT
          i_inherit_flags       = p_i_inheritance_flags
    *     OLD_SEQUI             =
    *     EXEC_MEAS             = ' '
    *     CALL_EXIT             = ' '
    *     CHECK_NEW             = 'X'
          transmit_new          = 'X'
          direct_new            = ' '
          commit_new            = 'X'
        CHANGING
          s_equi                = p_ls_equi
          r_equi                = p_ls_equi_target
          r_iflo                = s_iflo
        EXCEPTIONS
          err_install           = 1
          OTHERS                = 2
    How can I enable this inside one function module?
    Please, any hints are welcome!
    Regards,
    Andreas

    So, what I have done now is the following:
    IF bapiret2-type EQ 'S'.
        COMMIT WORK AND WAIT.
    *   now check if changes are written to db
        DO.
          l_iwerk = 0.
          " get the latest item entry
          SELECT SINGLE iwerk FROM equz
            INTO l_iwerk
            WHERE equnr EQ p_ls_equi-equnr AND
                  datbi EQ '99991231'.
          IF l_iwerk EQ equitime-planplant.
            p_rc = 0.
            EXIT.                 " data written to db -> exit
          ELSE.
            WAIT UP TO 2 SECONDS. " wait and check in next loop
          ENDIF.
          IF sy-index EQ 10.
            p_rc = 1.             " set returncode to 1
            EXIT.                 " after 10 times -> exit
          ENDIF.
        ENDDO.
      ENDIF.
    This code checks if the respective entry in the db is already written and if not retry to read it with a delay of 2 seconds.
    Looks a little bit ugly but does the job.
    If anyone could get me to a "better" solution I would be happy to hear!

  • Powershell Name Change with If else not working as expected

    The script we've written below executes the if statement correctly and changes the name properly though the else condition is not working properly.  The example data file we  use for input is shown below and it's name is namechanges.csv
    Test,User,User1,1111,2222,[email protected]
    Test,Smith,User2,2222,3333,[email protected]
    Test,Jones,User3,3333,4444,[email protected]
    Test,Doe,User4,4444,5555,[email protected]
    Test,Example,User5,5555,7777,[email protected]
    The script shown below changes the name in Active Directory, home directory, and Exchange to a unique username and new last name (eg. maiden name needs changed to married name)
    $ADRoot = [ADSI]''
    $ADSearch = New-Object System.DirectoryServices.DirectorySearcher($ADRoot)
    add-PSSnapIn -name Microsoft.Exchange.Management.PowerShell.Admin
    Import-module ActiveDirectory
    Get-Content C:\New_Account\namechanges.csv |
    ForEach {
        $Fname = ($_ -split ',')[0]
        $nLname = ($_ -split ',')[1]
        $lname = ($_ -split ',')[2]
        $NUM = ($_ -split ',')[3]
        $ID = ($_ -split ',')[4]
        $requestor = ($_ -split ',')[5]
     $Counter = 0
    $Emp = Get-aduser -Filter {(employeeID -eq $ID)-and (EmployeeNumber -eq $NUM)}
    $SamAccount = (get-aduser -Filter {employeeID -eq $ID }).SamAccountName
    $SamAccount
    $FNAME = (get-aduser -Filter {employeeID -eq $ID }).GivenName
    $FNAME
    $LNAME = (get-aduser -Filter {employeeID -eq $ID }).Surname
    $LNAME
    $UserPrincipalName = (get-aduser -Filter {employeeID -eq $ID }).UserPrincipalName
    $UserPrincipalName
    Start-Sleep 2
    Set-ADUser $SamAccount -surname $nlname -DisplayName $FNAME" "$nlname
    Start-Sleep 2
    if ($Emp -ne $null)
          $Counter = 1
       $Counter
          Do
         $F = $Fname.remove($Counter)
         $newusername = $F + $nLname
         $ADSearch.Filter = "(&(objectClass=user)(sAMAccountName=$newusername))"
         $Result = $ADSearch.FindAll()
         $t = $result.Count          
                   if ($t -lt 1)
          $FoundUniqueUserName = $True
             Else
          $Counter = $Counter + 1
          $FoundUniqueUserName = $False
       While ($FoundUniqueUserName -eq $False)  
       $newusername 
    Start-Sleep 2
    rename-adobject -identity ((get-aduser $Emp).ObjectGUID) -NewName "$Fname $nLname"
    Start-Sleep 2
    Rename-Item \\secret.com\share\home\$SamAccount $newusername
    Start-Sleep 2
    Set-ADUser $SamAccount -surname $nlname -DisplayName $Fname" "$nlname
    Start-Sleep 2
    $newUPN = $newusername + "@secret.com"
    Start-Sleep 2
    Set-ADUser $SamAccount -SamAccountName $newusername -UserPrincipalName $newUPN
    Start-Sleep 5
    $Mailbox = Get-Mailbox -Identity $SamAccount
    $SMTPAddress = $Mailbox.PrimarySmtpAddress
    $Domain = $SMTPAddress.Domain
    Start-Sleep 5
    $emailaddress = "$newusername@$Domain"
    Start-Sleep 5
    Set-Mailbox $SamAccount -EmailAddressPolicyEnabled:$False -PrimarySmtpAddress $emailaddress -Alias $newusername
    Start-Sleep 5
    Set-Mailbox $emailaddress -EmailAddressPolicyEnabled:$true
    Start-Sleep 5
         $smtpServer = "mail.secret.com"
         $msg = new-object Net.Mail.MailMessage
         $smtp = new-object Net.Mail.SmtpClient($smtpServer)
         $msg.From = "[email protected]"
         $msg.To.Add($requestor)
         $msg.subject = "A name change request for $FNAME $LNAME was succesfull"
         $msg.body = "A name change request for $FNAME $LNAME was succesfull"
         $smtp.Send($msg)  
    Start-Sleep 8
    Else
         $smtpServer = "mail.secret.com"
         $msg = new-object Net.Mail.MailMessage
         $smtp = new-object Net.Mail.SmtpClient($smtpServer)
         $msg.From = "[email protected]"
         $msg.To.Add($requestor)
         $msg.subject = "A Name change request was received but the script failed to make the change."
         $msg.body = "A name change request for $FNAME $LNAME was requested with the employee id and number of $ID and $NUM. The request was not succesfull"
         $smtp.Send($msg)   
    Out-File C:\New_Account\name_change_log.txt -InputObject "At $([datetime]::now) there was a name change request for $Fname $lname-$nLname with ID of $ID and number of $NUM." -Append
    Start-Sleep 5
    #Remove-Item C:\New_Account\namechanges.csv
    Else {
    "Something went wrong"
    Can someone take a look at the code and see where I went wrong with the else statement?  Let's say hypothetically Test Smith is a common name and already exists in Active Directory in the same OU we attempt to make the username unique however if that
    fails I would like to receive the email and  update the name change in some other way.

    Well the code you presented has two issues that I can see
    You have the following
    While ($FoundUniqueUserName -eq $False)
    $newusername
    Start-Sleep 2
    rename-adobject -identity ((get-aduser $Emp).ObjectGUID) -NewName "$Fname $nLname"
    Start-Sleep 2
    Rename-Item \\secret.com\share\home\$SamAccount $newusername
    Start-Sleep 2
    Set-ADUser $SamAccount -surname $nlname -DisplayName $Fname" "$nlname
    Start-Sleep 2
    $newUPN = $newusername + "@secret.com"
    Start-Sleep 2
    Set-ADUser $SamAccount -SamAccountName $newusername -UserPrincipalName $newUPN
    Start-Sleep 5
    $Mailbox = Get-Mailbox -Identity $SamAccount
    $SMTPAddress = $Mailbox.PrimarySmtpAddress
    $Domain = $SMTPAddress.Domain
    Start-Sleep 5
    $emailaddress = "$newusername@$Domain"
    Start-Sleep 5
    Set-Mailbox $SamAccount -EmailAddressPolicyEnabled:$False -PrimarySmtpAddress $emailaddress -Alias $newusername
    Start-Sleep 5
    Set-Mailbox $emailaddress -EmailAddressPolicyEnabled:$true
    Start-Sleep 5
    $smtpServer = "mail.secret.com"
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = "[email protected]"
    $msg.To.Add($requestor)
    $msg.subject = "A name change request for $FNAME $LNAME was succesfull"
    $msg.body = "A name change request for $FNAME $LNAME was succesfull"
    $smtp.Send($msg)
    Start-Sleep 8
    Which has no open and closing brackets for the while loop, then at the end of the script you have
    #Remove-Item C:\New_Account\namechanges.csv
    Else
    "Something went wrong"
    That else has no opening If statement.....I would fix these issues first, straighten your code out a bit and see if it works then, as the no opening and closing brackets on the While loop and the extra else statement, may be giving you some issues.
    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
    Don't Retire Technet

  • Battery changed,but click wheel not working again

    i was changed the new battery for my ipod mini 4G 1 st gen, however the click wheel not working again. the ipod is chargeble, and can lock and unlock, but when the switch turn back to unlock, the ipod is restarting. does anyone who knows what problem i have, and how to fix it? thank you so much
    dell   Windows XP  

    very likely it is a hardware issue, if after restore to factory setting does not solve.
    it could be caused by poor contact or the faulty click wheel of the iPod, just like mine

  • Code to change JTable cell color not working

    My code below is supposed to change the color
    of a single JTable cell however its not working.
    Could anyone please tell me why?
    Here's the code:
    import java.awt.*;
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class ColorTable extends JTable {
    public ColorTable() {
    AbstractTableModel tableModel = new AbstractTableModel() {
    public Class getColumnClass(int column) { return Integer.class; }
    public int getColumnCount() { return 6; }
    public int getRowCount() { return 10;}
    public Object getValueAt(int row,int col) { return new Integer(row * col); }
    setModel(tableModel);
    setDefaultRenderer(Integer.class,new ColorRenderer(Color.cyan));
    this.setRowSelectionAllowed(false);
    this.setCellSelectionEnabled(true);
    addMouseListener(new MouseAdapter() {
    private ColorRenderer renderer;
    private JColorChooser chooser = new JColorChooser();
    public void mousePressed(MouseEvent e) {
    if(e.getModifiers() == MouseEvent.BUTTON3_MASK) {
    System.out.print("rowAtPoint(e.getPoint())=" +rowAtPoint(e.getPoint()));
    System.out.print( "columnAtPoint(e.getPoint()))=" + columnAtPoint(e.getPoint()));
    renderer = (ColorRenderer)getCellRenderer(rowAtPoint(e.getPoint()), columnAtPoint(e.getPoint()));
    // chooser.setColor(renderer.getColor());
    renderer.setColor(chooser.showDialog((Component)e.getSource(),"Choose Cell Color",chooser.getColor()));
    class ColorRenderer extends DefaultTableCellRenderer {
    private Color cellColor;
    public ColorRenderer(Color color) { cellColor = color; }
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    System.out.print("row= " + row + "\n");
    System.out.print("column= " + column + "\n");
    System.out.print("OBJECT VALUE=" + value.toString());
    //Component comp = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    if (isSelected) {
    setOpaque(true);
    setBackground(cellColor);
    else {
    setBackground(Color.white);
    setForeground(Color.black);
    return this;
    public void setColor(Color color)
    cellColor = color;
    ColorTable.this.repaint();
    public Color getColor() { return cellColor; }
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    ColorTable table = new ColorTable();
    panel.add(table);
    frame.getContentPane().add(panel);
    frame.setSize(500,250);
    frame.setVisible(true);

    My code below is supposed to change the color
    of a single JTable cell however its not working.
    Could anyone please tell me why?
    Here's the code:
    import java.awt.*;
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class ColorTable extends JTable {
    public ColorTable() {
    AbstractTableModel tableModel = new AbstractTableModel() {
    public Class getColumnClass(int column) { return Integer.class; }
    public int getColumnCount() { return 6; }
    public int getRowCount() { return 10;}
    public Object getValueAt(int row,int col) { return new Integer(row * col); }
    setModel(tableModel);
    setDefaultRenderer(Integer.class,new ColorRenderer(Color.cyan));
    this.setRowSelectionAllowed(false);
    this.setCellSelectionEnabled(true);
    addMouseListener(new MouseAdapter() {
    private ColorRenderer renderer;
    private JColorChooser chooser = new JColorChooser();
    public void mousePressed(MouseEvent e) {
    if(e.getModifiers() == MouseEvent.BUTTON3_MASK) {
    System.out.print("rowAtPoint(e.getPoint())=" +rowAtPoint(e.getPoint()));
    System.out.print( "columnAtPoint(e.getPoint()))=" + columnAtPoint(e.getPoint()));
    renderer = (ColorRenderer)getCellRenderer(rowAtPoint(e.getPoint()), columnAtPoint(e.getPoint()));
    // chooser.setColor(renderer.getColor());
    renderer.setColor(chooser.showDialog((Component)e.getSource(),"Choose Cell Color",chooser.getColor()));
    class ColorRenderer extends DefaultTableCellRenderer {
    private Color cellColor;
    public ColorRenderer(Color color) { cellColor = color; }
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    System.out.print("row= " + row + "\n");
    System.out.print("column= " + column + "\n");
    System.out.print("OBJECT VALUE=" + value.toString());
    //Component comp = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    if (isSelected) {
    setOpaque(true);
    setBackground(cellColor);
    else {
    setBackground(Color.white);
    setForeground(Color.black);
    return this;
    public void setColor(Color color)
    cellColor = color;
    ColorTable.this.repaint();
    public Color getColor() { return cellColor; }
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    ColorTable table = new ColorTable();
    panel.add(table);
    frame.getContentPane().add(panel);
    frame.setSize(500,250);
    frame.setVisible(true);

Maybe you are looking for

  • Trying to open a file from an older version to a new version of indesign

    I'm on am mac and i am trying to open a file from the 2014 indesign with 2015 software, i am getting this error: what i don't understand is why a newer version can't read the file of an older version

  • Bring objects to front

    How can I implement this? I tried to use: (this.numChildren - 1) But it doesn't work. I want to use this code because I have 8 boxes, each are 100px X 100px. You hover each box and they flip over but the "backside" of these cards are larger in both l

  • Can you upgrade the Apple MacBook MB466LL/A to 8gb ram

    can you upgrade the Apple MacBook MB466LL/A to 8gb ram

  • Viewing iWeb site in different browsers

    I have created a site using iWeb (v. 2.0.3) and am ready to publish. When I preview the index page in Firefox (my default browser) and in Safari, the site looks great and the navigation bar at the top of the welcome page is operable so I can see how

  • This field name is not known. on the server

    I have an issue using RPT file to generate a report using my .NET web app on the server, locally the report is generated fine, but on the server it's giving me the error "The field name is not known": [COMException (0x80041019): This field name is no