public static void EnforceCalculationRollup(IOrganizationService OrganizationService, EntityReference record, string rollupField) { CalculateRollupFieldRequest rollupRequest = new CalculateRollupFieldRequest { Target = record, FieldName = rollupField }; CalculateRollupFieldResponse response = (CalculateRollupFieldResponse)OrganizationService.Execute(rollupRequest); Entity entity = response.Entity; OrganizationService.Update(entity); }
Hope this helps!
No comments:
Post a Comment