Scripting

  • 1.  WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-27-2012 15:05
    WTF! S/O Invoice Header business objects DON'T TRIGGER POST DELETE EVENTS WHEN A SAVED INVOICE IS DELETED!!! I had previoulsy discovered, reported and posted the lack of ANY EVENT when a new invoice is deleted before Accepting, even after multiple lines have been successfully entered. I think they need a new document called The Holes in Advanced Script Suitable for Large Trucks.


  • 2.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-27-2012 15:22
    What version did you try it on - I wonder if you're running into the issue @BrettLyder mentioned today. I guess you could check to see if your PostDelete() code made it SO_Invoice_bus.vbs I tried it just now on MAS 200 4.40 PU6 with no Job Ops and when I try to delete a saved invoice my PreDelete() fires then I get the standard MAS msg ""are you sure you want to delete Yes/No"" then clicking Yes does fire my PostDelete(). I have batch entry turned on.


  • 3.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-27-2012 15:38
    Hmmmm...It is in my SO_Invoice_bus in all three environments that I've tested. Right next to the Pre Delete sub. I tried it on MAS 90 4.40.8, MAS 90 4.50.0 and MAS 200 SQL 4.5.2. All three generate ONLY the pre delete event, and none generate the post delete. I get the ""are you sure"" prompt, but nothing after that. I wonder what else cold be different? I'll try it on my 4.40.6 MAS 200. Thanks for the feed back! (Again)


  • 4.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-27-2012 15:49
      |   view attached
    Here's a screen shot immediately after the ""are you sure"" prompt was affirmed. Notice the Pre Delete trace message and then 9 Post Delete detail messages but no Post Delete header message.


  • 5.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-28-2012 00:06
    Works the same on my MAS 200 4.40 system.S/O Invoice Post Deletes do not run in Oregon. I guess only in California.


  • 6.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-28-2012 11:12
    @AlnoorCassim Could you post or send me your script. Mine has both a MessageBox and a DebugPrint in the script which is on what I am basing my claim. However, there is also a MAS generated message to the trace Window (""SCRIPT/CallScript - RefCount:01 Class:SO_nvoice_bus_Proc: PreDelete"") also. So I am confident I've got nothing setup wrong. The only difference in the scripts is that the constant ""Pre"" is set to ""Post"". The same setup in SO_SalesOrder_bus.vbs works as expected.


  • 7.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-28-2012 12:45
    Let me try it myself on other versions then will contact you privately. Worst case we can step through Mas code execution to see whats making it not get processed. Kind of sounds mas programming skips this under certain data condition. BTW do you have Retain Deleted Invoices in History turned on (I dont)? Or batch entry off?


  • 8.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 04-28-2012 12:59
    @ClarkWalliser asked the question about retain deleted invoices and I thought that a eureka moment, but I tested it both ways and it made no difference noor :-) did Batch entry on or off.


  • 9.  RE: WTF! S/O Invoice Header business objects DON'T TR

    Posted 06-08-2012 12:01
    Invoice Heater"" thats funny