Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Set-PWDocumentState failing
    • Sign In

    • State Suggested Answer
    • Replies 2 replies
    • Answers 1 answer
    • Subscribers 65 subscribers
    • Views 654 views
    • Users 0 members are here
    • powershell
    • powershellscripting
    • ProjectWise
    • ProjectWise Programming
    • ProjectWise PowerShell Modules

    Set-PWDocumentState failing

    Ananthakumar Mani
    Offline Ananthakumar Mani over 2 years ago

    I am trying to change the state of a file with using the below code, but i am getting an error message like below.

    If someone could correct me where i am wrong would be very much appreciated

    Error Message : 

    VERBOSE: Found 1 documents
    WARNING: Failed to change state to 'Superseded (Approved)' for 'Projects\4 Delivery\file.dwg'. Error: 58268

    $State = Get-PWDocumentsBySearch -FolderPath $FullPath -FileName ($UniqueID + $SupptoPW_FileType) -JustThisFolder -GetAttributes -Verbose | 
                        Set-PWDocumentState -State 'Superseded (Approved)' -SkipIntermediateStates -Verbose
    .

    • Sign in to reply
    • Cancel
    • Brian Flaherty
      0 Offline Brian Flaherty Mon, Aug 2 2021 9:41 AM

      It appears you are using the Workflow Rules Engine. Not sure you will be able to set the document state. There are others posts covering this topic. You may want to take a look.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Aniruddh Chavan
      0 Offline Aniruddh Chavan Mon, Aug 2 2021 1:07 AM

      Hi Ananthakumar Mani,

      You could use Get-PWError cmdlet to know more info about the error, in your case it says "Manual change is not allowed...." 

      -Thanks,

      Aniruddh 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies