I created a customization on the PO Entry screen that has a job of simply calling the Adapter.Method involved in getting the "Default GL Account" for the PONum's Line.
I tried to do this with the "YourButtonNameHere.PerformClick();" but that failed, so I then looked to calling the adapter.method itself. My code below is what I have so far:
private void edvPORel_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
if ((args.Row > -1))
POAdapter POAdapt = new POAdapter(this.oTrans);
I figured this would be enough since the trace specified you have to have the POnum, POLine, and Rel, to run the method, but after running the screen I keep getting the error below:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Company='YourCompHere' PONum='83981' POLine='1' PORelNum='1' RowIdent='0x0000000005fb0fe6': ForeignKeyConstraint DetailRelease requires the child key values (YourCompHere, 83981, 1) to exist in the parent table.
I'm not sure how to proceed. Since I'm using the adapter right out of the screen the parent table should already be setup right? I'm pretty lost at this point, any help would be greatly appreciated. Maybe one of you has run into this before? I'm just trying to "click" the Get Defaults button on the PO screen's Releases --> Detail tab.