Reputation: 3
Is there a way to force a rollup field to do it's calculation rather than having to "refresh" the field on the form?
Upvotes: 0
Views: 160
Reputation: 2087
You can use CalculateRollupFieldRequest
in plugin when component field is updated:
CalculateRollupFieldRequest request= new CalculateRollupFieldRequest
{
Target = new EntityReference("<entityname>", recordId),
FieldName = "<rollup field to refresh>"
};
CalculateRollupFieldResponse response = (CalculateRollupFieldResponse)service.Execute(request);
Upvotes: 1