Sage 100

 View Only
Expand all | Collapse all

I need to change the status of a bunch of purchase

John Leonard

John Leonard09-06-2018 13:23

John Leonard

John Leonard09-06-2018 14:43

John Leonard

John Leonard09-06-2018 15:01

Marcos DeLuna

Marcos DeLuna09-06-2018 15:11

John Leonard

John Leonard09-06-2018 15:19

Alnoor Cassim

Alnoor Cassim09-06-2018 15:20

  • 1.  I need to change the status of a bunch of purchase

    Posted 09-06-2018 10:58
    I need to change the status of a bunch of purchase orders to ""Completed"" via VI. Isn't there a way to update the data validation to allow a status of ""X""? Thanks!


  • 2.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 11:39
    Search SC for instruction on modifying the data dictionary. @AlnoorCassim has posted several times. Don't forget to change the last update date (?) field as well


  • 3.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 12:19
    Thanks @JeffSchwenk I saw that but this issue is not changing the ability to write into the status field but changing the validation so it allows an ""X"". I did not see where I could change the validation. I am sure I am not looking at something obvious.


  • 4.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 12:35
    Best to import but the business object may even prevent that...


  • 5.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 12:55
    I thought once a PO qualified as being closed, the status updated automatically.


  • 6.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 12:58
    @KevinMoyes That is correct. The issue they have a ton of PO's several years old that do not ""qualify"" as closed so we are trying to force the status to closed so we can purge them out. I realize the ramifications to purchases clearing etc.


  • 7.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 13:04
    Doesn't the Purge Obsolete utility ignore status?


  • 8.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 13:19
    John I think a VI Export (instead of Import) with Perform Logic that directly updates the Status (not thru the biz object) is the way to go. So you would export out only these old PO's. The Perform would then run only on these POs and update their status. I'll see what I can whip up.


  • 9.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 13:23
    @AlnoorCassim Thanks!


  • 10.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:40
    John, I had to write a quick and dirty utility to change the status and the completion date. All you would need to do is enter the CSV filename and completion date. The PO# has to be in the first column. Once that done, you can use the Purge Completed Orders utility to remove them. If you want it, I can send it to you with instructions.


  • 11.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:43
    Part 1 of Multi-part answer: Criteria for the **Purge Obsolete utility** in case this could work for you: For convenience let's call the date you select on the screen the _Cutoff Date_ and the POs you select in the grid the _PO Grid Selection_: PO Grid Selection from the screen and Purchase Order Date <= Cutoff Date and Last Purchase Order Date <= Cutoff Date and Last Invoice Date <= Cutoff Date and Last Receipt Date <= Cutoff Date and Last Issue Date <= Cutoff Date So it doesn't care about the Order Status but it's comparing every type of PO date against the Cutoff Date.


  • 12.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:43
    @MarcosDeLuna Sure that would be great.


  • 13.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:47
    @AlnoorCassim If I am understanding you correctly, my issue is that there have been some receipts posted against these PO's and I just want it to look at the PO date for the cutoff date.


  • 14.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:55
      |   view attached
    Here you go john. I wrote it for v2017 but it will work for any version where PO is in framework.

    Attachment(s)



  • 15.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 14:56
    Part 2 of Multi-part answer: **Perform Logic** to set in a V/I Export to update Order Status to X and set Completion Date. This would be followed by running Purge Completed PO utility. _The idea here is whatever POs you export those are the ones acted on._ * DO THIS IN A TEST COMPANY FIRST * 1) Create a V/I Export for PO_PurchaseOrderHeader. Have it save to a a file called POs_SetForCompletion.txt or similar. 2) In Data tab make sure PO Number is the first field. All other fields are optional but I would add at least date fields so you cna look at the export file later to see which ones had the Order Status set to Complete. 3) In Select tab you can optionally put in date selection criteria or whatever you want. Either that or choose Run Time Assigned back in the Data tab. 4) Back on Configuration tab click Perform and setup like you see in this screenshot. 5) Take attached file and place in \mas90\PFM folder (create the folder if needed) ** The Main thing to figure out is how you want to set the Completion Date ** Look at Lines 23 - 25 of the pvx file (you can open with Notepad). In my example, I set it to Today. But the on next line, I have it commented out but it's set to Last Receipt Date. So set it to what you want.

    Attachment(s)

    zip
    SetPOStatus2Closed.zip   704 B 1 version


  • 16.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:01
    @MarcosDeLuna @AlnoorCassim Thanks!!


  • 17.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:02
    @AlnoorCassim, Nice. Never would have thought of doing it that way. I did not see lines 23-25 though. I counted 18 lines.


  • 18.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:04
    Sorry Marcos I copied it from the wrong folder. Download and look at it again.


  • 19.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:11
    Got it. Thanks.


  • 20.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:13
    @AlnoorCassim If I want to hard code a completion date, would the syntax be 20180831$ (for 08/31/2018)? Thanks


  • 21.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:18
    Verbatim like this below including the quotes: `PO1.CompletionDate$ = ""20180831""`


  • 22.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:19
    @AlnoorCassim Perfect. Thanks,.


  • 23.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:20
    Don't forget to try on TEST COMPANY FIRST.


  • 24.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 15:44
    @AlnoorCassim Always test first on test co and backup when on live data. Thanks again for your help.


  • 25.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 16:01
    Just musing... about a different way to deal with closing PO's. UDF_FORCE_CLOSE checkbox in PO header. Column post validate script on the UDF, to SetValueNoValidate any required fields (when value = ""Y""). VI job to import into the UDF (and let the script do its thing...). ?


  • 26.  RE: I need to change the status of a bunch of purchase

    Posted 09-06-2018 16:16
    Kevin that's good thinking. However I believe the validation for the Order Status is directly in the business object as opposed to the dictionary. You might get a ""Invalid Order Status for this Purchase order"" as your LastErrorMsg even on SetValueNoValidate. That's why in my Perform and in Marcos' utility it avoids the biz object and updates directly. Now having said that, pretend I didn't say that and just try it :-) (maybe a simple button script)


  • 27.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 07:57
    Does flagging as closed then purging them using above steps allow you to avoid have to edit PO's that have been partially received or received and not invoiced? Does it update purchases clearing for PO lines that are no longer there because of purging?


  • 28.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 08:03
    For that to work the purge utility would have to create data for DTR / GL entries... and somehow I don't think Sage would make that kind of effort. It's my understanding that after purging, you need to do manual GL entries to bring the GL in line with outstanding Purchases Clearing amounts.


  • 29.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 08:29
    It does not update the purchases clearing account.


  • 30.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 08:37
    I believe it was back in Vegas during a user session that Diane Coffman led where she discussed the future of this clean up utility. Wonder what ever happened to those flip chart notes??


  • 31.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:13
    Confirmed by Sage I remember that topic well! It was the number one request in Influence the Design in 2014 and has remained important at sessions since then. I have logged, classified, and ranked all of those requests into our database. At this point, all decision are made by Linda Cade. You might want to reach out to her. ??


  • 32.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:20
    @AlnoorCassim The button script seemed to work with ABC data. PO was marked as Completed with a date. Super simple! retSet = 0 retSet = oBusObj.SetValueNoValidate(""OrderStatus$"", ""X"") retSet = oBusObj.SetValueNoValidate(""CompletionDate$"", ""20180101"") Before deploying I'd put in place some sort of ""are you sure?"" prompt (with a reminder about fixing the GL), but we get this question often enough it is nice to have a brute force solution when a customer wants one.


  • 33.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:24
    Way to go Kev! Now we have 3 - 4 ways of doing this.


  • 34.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:25
    Thanks again everyone. This is what makes this group great!


  • 35.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:36
    Wow, just wow. I would also put in a loop to verify that the user is part of an Admin group. Easier than just setting up a special panel for the user.


  • 36.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 09:49
    Yes, that is a good idea Jeff. I'd certainly want to wrap a few levels of protection around such a script, and an IsMember role check would fit nicely.


  • 37.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 12:39
    Also, this light bulb just fired off - Us the PO module date for the completion date. User can change that date instead of using a fixed hard coded date.....


  • 38.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 12:58
    (Of course a dynamic date would be better. I just tested something quick to make sure the business object would allow the change to Completed).


  • 39.  RE: I need to change the status of a bunch of purchase

    Posted 09-07-2018 13:54
    Only if it held from PO to PO. IMHO, this might be a monthly exercise so setting it once would be preferable. But then of course, if users could be trained to pay attention to the PO, Received and invoice quantities matching when they post and follow up accordingly, life would be much simpler...


  • 40.  RE: I need to change the status of a bunch of purchase

    Posted 09-08-2018 10:48
    Still thinking on this. I would also add a UDF flag (eg manually closed?) to set when the script runs so that history shows how it completed.


  • 41.  RE: I need to change the status of a bunch of purchase

    Posted 10-12-2018 12:41
    @KevinMoyes Did you ever bring this button script to fruition? I need to do something for a client. PM or call me if this is easier.


  • 42.  RE: I need to change the status of a bunch of purchase

    Posted 10-12-2018 12:44
    I only tested with the proof of concept commands above... not having time to take it any further.