Bulk close Purchase Orders - Python

Bulk close Purchase Orders - Python

Requirement:  Delete older Purchase Orders.

UseCase:  Closing Purchase Orders from a external CSV.

Please follow the below steps. 
    1. Extract the attached scripts in a folder.
    2. Update the URL and integration key in the script. 
      1. You can get the integration key under Admin > Integrations > Integration Key > New
      2. Please use an integration key with admin privilege, as there wont be any role related permission issues. 

      3. Update the integration key in the python script.

    3. Since this is a one time activity we can invoke the script from command prompt.
    4. Open command prompt as administrator in the folder location and invoke the script.

      1. Update the CSV file name as per your instance.  In my instance, it is 1671028684384.csv



                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Automatically close request after successive approval reminders.

                        This post describes the use of a python script to close requests after successive approval reminders using Custom Schedules. Use Case: We have an option under the self-service portal in order to send reminders mail for the approvals, what would be ...
                      • Close change requests using custom schedules.

                        This post describes the use of a python script to close change that are in a specific stage using Custom Schedules.   Use Case: There may be a scenario where number of old Change Requests that have gotten lost in the shuffle over the years. Most of ...
                      • Purchase details

                        SELECT po.POCUSTOMID "PO Number", max(po.PONAME) "PO Name", max(po.TERMS) "PO Terms", LONGTODATE(max(po.DATEORDERED)) "Ordered Date", max(pos.STATUSNAME) "PO Status", max(poa.FIRST_NAME) "Purchase Requester", max(po.SHIPTO) "Ship To", max(paao.NAME) ...
                      • How to setup Python on the Server

                        This article explains how to set up the ServiceDesk plus server to run python scripts. 1. The first step is to install python on the application server and you can download it from here . Any version above 3.4.1 should work fine. Once you've ...
                      • How to close associated incident requests of change request automatically

                        This post describes the use of a python script to close change that are in a specific stage using Custom Schedules. Use Case: There may be a scenario where number of Change Requests that have got closed and the associated incident is still in open ...