Invoke Rollup Fields Calculation programatically in CRM

Hi,

Rollup field calculation is done by an async CRM Workflow , however in many scenario you may want to perform run time calculation , the following code illustrate how to invoke the calculation prgroamtically.

CalculateRollupFieldRequest rollupRequest=

new CalculateRollupFieldRequest { Target = new EntityReference("new_customentity", entityId), FieldName = "new_rollupfield"};

CalculateRollupFieldResponse response =(CalculateRollupFieldResponse)service.Execute(rollupRequest);

Leave a Reply

Your email address will not be published. Required fields are marked *