I want to add some additional filtering in the PO suggestions : before the ‘generate PO’ runs, I want to delete some rows from the datatablel ttSugPoDtl.
Do you have a clue/example how to do that?
I have tried something like “ttSugPoDtl.Delete(ttSugPoDtlRow);” within a foreach, but I get the errormessage “SugPoDtlTable does not contain a definition for delete…”
Thanks for your reply.
I’m afraid that filtering during the search is not possible, since the filtering is done IN the Generate method of the POSugg business object.
So as far as I can see, I will have to do something after the filtering has been done (post-processing of Generate method). There I can delete the obsolete rows in ttSugPoDtl table.
I do processing on Posugg.GetRowsPlant, so I hung @timshuwy’s code on this method post processing and it does clear any records in the select from the tt table presented to the buyer. they are still in the data just not presented for the user to check buy on.
I am confused by the Buyer versus User. If you only want records for the current user regardless of buyer then you could update the BuyerID on the record marked buy with the current user. Then the Epicor processing would take over.
If you have a user that generates for several buyers then you could set the buyer id and use your UD table to set them back in post generation to the actual buyer. @josecgomez has a “way” to find those POs after generation that I used this week to transfer settings.
Your line of code works.
Unfortunately, it does not add to the solution.
The pre-processing of the Generate has no dataset yet, the post-processing has already processed the dataset.
So I am now working on a solution based on the comments of Greg.
Thank you all for thinking along !
Did you get a working solution on this? I have created a BPM to block users entered a PO manually when they are not the buyer on the Part but I am now looking at stopping them from seeing entries in the POSuggestions after an MRP where they are not the buyer.