recId = "38182"; CustInvoiceJour = ax.CreateRecord("CustInvoiceJour"); CustInvoiceJour.ExecuteStmt( "select firstonly %1 where %1.RecId == "+recId);