cast the result of updateOpportunity