nLookupTask returns 0, sLastErrorMsg is empty

SOLVED

I'm trying to read from AP_VendorElectronicPayment and not having a whole lot of luck. I've verified that electronic payments are enabled for the vendor, and I can access electronic payments settings using the same credentials as this code runs under.

After the following lines...

int TaskID = (int)oSS.InvokeMethod("nLookupTask", "AP_VendorElectronicPayment_Ui");
var error = oSS.GetProperty("sLastErrorMsg");

... TaskID is 0 and error is an empty string. I copy/pasted the setup code (i.e. nSetUser, nSetCompany, nSetDate, nSetModule) from another function where I'm reading from AP_Vendor, and that runs just fine.

I've searched the forums and Googled anything I can think of, but nothing's working. Having run out of ideas, I throw myself at your mercy. If it's not obvious, this is in C#, using the Sage-provided DispatchObject class.

Thanks, I really appreciate any help y'all can provide.