I am trying to obtain the strongly type version of the target entity in pre-create stage by following way as I found this code while googling:
DynamicEntity target = (DynamicEntity)_context.InputParameters[ParameterName.Target];
PlannedGiving myTarget = target.ToCrmEntity(xrmDataContext).ToCrmEntity<PlannedGiving >();
but I am getting this error...
'Microsoft.Crm.Sdk.DynamicEntity' doesn't contain the definition for 'ToCrmEntity'
What am I missing here? Or is there any better way to achieve this?
Thank you in advance.