We need the ability to default Drop Ship PO's to seperate AP Accrual accounts based on the PO Type in order to satisfy a process and reporting requirement for an investor. Since the PO Setup only allows for one set of defaults, I have been attempting to modify the PO Maintenance screen to programatically change the defaults based on the POType/PO Line Type.
Since we don't allow various PO types to be combined on a single PO, looking for POType of "DP" in an event and changing the defaults should be simple right? Not really.
I have been successful in using the field and line "chk" events to handle this when manually entering a Drop Ship PO. The problem comes when I try to set the accounts on an auto-generated Drop Ship PO created from a DS order in the OM module. I've tried several different logics but everything seems to fire to early or not fire at all when the system populates the PO in the PO Maintenance screen.
Has anyone been able to address an issue like this? I've spent several hours testing the different events and none of the events seem to fire on the screen after the detail level is loaded by the system. Here is what I tried so far.
1) Override the "Default" Event and modify. - This works is you stop processing by returning something other than zero in retval. Otherwise, it replaces my default with the system default in POSetup.
2) Override OnLoad/OnDisplay - I've tried modifying the defaults in bPOSetup.APAccrAcct and directly modifying the Detail Level data in here. Neither works and the lines are set to the POSetup default.
3) Override LineChk/Chk - These don't seem to fire when the system loads the data. Only when a user modifies the field/gridcolumn.
4) Override OnUpdate/OnFinish - This would ignore the value in the grid and reset it before it was inserted into the database, very much a "hack" and not something I wanted to try. Unfortunately this did not even work as the postprocessing subscreen appears to be called before the override is invoked.
Have I missed something? It's always possible in my haste that I tested one of these event improperly but I think I was pretty thorough. Does anyone have another suggestion?
Thanks,
Jason Irvan