Then you're selecting an internal id that isn't on the apply payment sublist. The apply list is only going to show invoices that match the customer, subsidiary, and AR account used on the payment. Also, trying to apply to a paid invoice throws the same kind of error.