You do not need to retrieve the Pre-Image. It is an entity instance already, so you should use it directly as an entity. It is designed for better performance. if you want to get the latest data, consider using a post-image or retrieving.
Entity preimage = context.PreEntityImages.Contains("PreImage") ? context.PreEntityImages["PreImage"] : null;
if (preimage == null)
{
// throw a invalid plugin execution exception
}
// do your logic here
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.