Cast like Jose did in the previous post:
Trigger ARInvoice Generation from API - not totally getting it - ERP 10 - Epicor User Help Forum (epiusers.help)