DynamicEntity currentQ = context.PreEntityImages["qd"] as DynamicEntity; Guid quoteId = ((Lookup)currentQ.Properties["quoteid"]).Value;